- 1

Tell me how can i display image in frame???

21st Dec 2016, 11:42 AM
Deepu Sharma
Deepu Sharma - avatar
2 Respuestas
0
do this after creating Jlabel imageLabel.setBounds(10, 10, 400, 400); imageLabel.setVisible(true); also set the layout to JFrame Game.f.setLayout(new FlowLayout);
21st Dec 2016, 12:02 PM
Eremie Gillowei
Eremie Gillowei - avatar
0
Create JLabel like this ImageIcon image = new ImageIcon("path & name & extension"); JLabel imageLabel = new JLabel(image);
21st Dec 2016, 12:04 PM
Eremie Gillowei
Eremie Gillowei - avatar