2025-09-26 11:12:16 +02:00
|
|
|
import java.awt.*;
|
|
|
|
import javax.swing.*;
|
|
|
|
|
|
|
|
public class GFenetre extends JFrame {
|
2025-09-26 14:57:00 +02:00
|
|
|
private JLabel imgJLabel;
|
2025-09-26 11:12:16 +02:00
|
|
|
|
|
|
|
public GFenetre() {
|
2025-09-26 14:57:00 +02:00
|
|
|
super("Galerie");
|
|
|
|
this.setSize(1000, 600);
|
|
|
|
this.setLocationRelativeTo(null);
|
|
|
|
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
2025-09-26 11:12:16 +02:00
|
|
|
|
2025-09-26 14:57:00 +02:00
|
|
|
this.imgJLabel = new JLabel();
|
|
|
|
this.add(this.imgJLabel, BorderLayout.CENTER);
|
2025-09-26 11:12:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2025-09-26 14:57:00 +02:00
|
|
|
public void afficherImage(ImageIcon image) {
|
|
|
|
this.imgJLabel.setIcon(image);
|
|
|
|
}
|
|
|
|
|
|
|
|
public JLabel getImageLabel() {
|
|
|
|
return this.imgJLabel;
|
|
|
|
}
|
2025-09-26 11:12:16 +02:00
|
|
|
|
|
|
|
}
|