Code to paint a picture to a panel:
public class MyDraw extends JPanel { background = new ImageIcon("src/background.jpg").getImage(); @Override