26 lines
524 B
Java
26 lines
524 B
Java
import java.awt.*;
|
|
import javax.swing.*;
|
|
|
|
public class GFenetre extends JFrame {
|
|
private JLabel imgJLabel;
|
|
|
|
public GFenetre() {
|
|
super("Galerie");
|
|
this.setSize(1000, 600);
|
|
this.setLocationRelativeTo(null);
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
this.imgJLabel = new JLabel();
|
|
this.add(this.imgJLabel, BorderLayout.CENTER);
|
|
|
|
}
|
|
|
|
public void afficherImage(ImageIcon image) {
|
|
this.imgJLabel.setIcon(image);
|
|
}
|
|
|
|
public JLabel getImageLabel() {
|
|
return this.imgJLabel;
|
|
}
|
|
|
|
} |