1-) JAVA - Label Demo
public class LabelDemo extends JFrame {
JLabel label;
ImageIcon icon;
Container container;
LabelDemo(){
this.setTitle("My JLabel Demo");
icon = new ImageIcon("C:\\Users\\senak\\Desktop\\Kitap\\31140721_isg.jpg");
label = new JLabel("Hello Word", icon, SwingConstants.LEFT);
container = getContentPane();
container.setLayout(new FlowLayout());
container.add(label);
this.setSize(300,200);
this.setVisible(true);
this.setLocation(400, 400);
this.setResizable(false);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
new LabelDemo();
}
}
