class MaFenetre extends JFrame{
private JPanel pan;
MaFenetre(){
setTitle("essai" );
setSize(800,500);
pan=new Paneau();
getContentPane().add(pan);
}
}
class Paneau extends JPanel{
public void paintComponent(Graphics g){
super.paintComponent(g);
g.drawImage((new ImageIcon("1.gif" )).getImage(),200,200,null);
g.drawImage((new ImageIcon("2.gif" )).getImage(),200,200,null);
g.drawImage((new ImageIcon("3.gif" )).getImage(),00,200,null);
}
}
public class PremTxt {
public static void main (String args[]){
MaFenetre fen=new MaFenetre();
fen.setVisible(true);
}
}