🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Sena KORKMAZ / JAVA / Label Demo

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();

}

 

}

 2021 Ocak 21 Perşembe
 114