- 1
Tell me how can i display image in frame???
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);
0
Create JLabel like this
ImageIcon image = new ImageIcon("path & name & extension"); JLabel imageLabel = new JLabel(image);