import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
class MyFrame extends JFrame{
    private JButton jButton1 = new JButton();
    public void paint(Graphics g){
        super.paint(g);
        ImageIcon icon = new ImageIcon("E:/temp/aaa.jpeg");
        g.drawImage(icon.getImage(),0,0,getWidth(),getHeight(),this);
    }
    public static void main(String[] args){
        MyFrame f = new MyFrame();
        f.setSize(200,200);        f.addWindowListener(new WindowAdapter()
        {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });        f.show();
        f.repaint();
    }    public MyFrame() {
        try {
            jbInit();
        }
        catch(Exception e) {
            e.printStackTrace();
        }
    }
    private void jbInit() throws Exception {
        jButton1.setBounds(new Rectangle(72, 49, 108, 31));
        jButton1.setText("jButton1");
        this.getContentPane().setLayout(null);
        this.getContentPane().add(jButton1, null);
    }
}