wow le tp là
This commit is contained in:
18
DEV3.1/TP02/01_Galerie/v1/Fenetre.java
Normal file
18
DEV3.1/TP02/01_Galerie/v1/Fenetre.java
Normal file
@@ -0,0 +1,18 @@
|
||||
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));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user