Files
DEV/DEV.3.1/TP/TP2/Galerie.1/GFenetre.java
EmmanuelTiamzon f7de13bc2a version copilot
2025-09-26 14:57:00 +02:00

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