hi, does anyone know how to insert a background picture to a JPanel?
I have googled around, found something seem more difficult than it should be, and a simple one as below but not showing the pic.
midBoard = new JPanel(); JLabel pic = new JLabel(new ImageIcon("Sunset.jpg")); //midBoard.setBackground(java.awt.Color.RED); midBoard.add(pic);
any suggestion? thanks