2025-10-08 16:39:06 +02:00
|
|
|
import java.awt.*;
|
|
|
|
import javax.swing.*;
|
|
|
|
|
|
|
|
public class Fenetre extends JFrame {
|
|
|
|
|
|
|
|
public Fenetre() {
|
|
|
|
this.setSize(900, 450);
|
|
|
|
this.setLocation(100, 100);
|
|
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
|
|
|
|
CardLayout layout = new CardLayout();
|
|
|
|
this.setLayout(layout);
|
|
|
|
|
2025-10-13 13:08:06 +02:00
|
|
|
JLabel img1 = new JLabel(new ImageIcon("../res/MICHEL.gif"));
|
|
|
|
JLabel img2 = new JLabel(new ImageIcon("img2.jpeg"));
|
|
|
|
JLabel img3 = new JLabel(new ImageIcon("img3.jpeg"));
|
2025-10-08 16:39:06 +02:00
|
|
|
JLabel img4 = new JLabel(new ImageIcon("img4.jpg"));
|
|
|
|
|
|
|
|
JLabel[] tableau = {img1, img2, img3, img4};
|
|
|
|
|
|
|
|
this.add(img1);
|
|
|
|
this.add(img2);
|
|
|
|
this.add(img3);
|
|
|
|
this.add(img4);
|
|
|
|
this.addMouseListener(new Controlleur(tableau, this, layout));
|
|
|
|
}
|
|
|
|
}
|