Help! How can I add image on my JFrame
? This is my code
public class JavaApplication79 extends JFrame{
ImageIcon icon = new ImageIcon("Downloads/splash.jpg");
JLabel label = new JLabel(icon);
public JavaApplication79(){
add(label);
setLayout(null);
setSize(900,500);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String args[]){
JavaApplication79 show = new JavaApplication79();
show.setVisible(true);
}
}