Files
DEV/DEV.3.1/TP/TP4/ex1_test/src/Fenetre.java
EmmanuelTiamzon 84332c8c08 update
2025-10-13 13:08:06 +02:00

27 lines
701 B
Java

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);
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"));
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));
}
}