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); this.setLayout(new GridLayout(1, 1)); JLabel img = new JLabel(new ImageIcon("img1.jpg")); this.add(img); this.addMouseListener(new Controlleur(img, this)); } }