import java.awt.*;
import javax.swing.*;
class Prova extends JFrame{
ImageIcon imma = new ImageIcon("tile1.jpg");
Image imma = imma.getImage();
JButton button;
public static void main(String[] args) {
Prova frame = new Prova();
frame.setVisible(true);
}
public Prova(){
Container contentPane = getContentPane();
contentPane.setLayout(new FlowLayout());
button = new JButton("ciao");
contentPane.add(button);
setTitle("CIAO");
setSize(900,600);
setLocation(200,150);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public void Paint (Graphics g) {
super.paint(g);
g.drawImage(Imma,0,29,this);
}
}