This commit is contained in:
AlgaLaptop
2025-12-28 00:50:00 +01:00
parent 27ec290315
commit 608853fcfe
16 changed files with 92 additions and 114 deletions
@@ -37,15 +37,12 @@ public class ConverterWindow extends JFrame {
*/
public ConverterWindow() {
System.out.println("Création de la fenêtre : " + Config.CON_NAME); // debug
// Configuration de la fenetre
this.setTitle(Config.CON_NAME);
this.setSize(Config.CONVERTISSEUR_FENETRE_TAILLE[0],
Config.CONVERTISSEUR_FENETRE_TAILLE[1]);
this.setTitle("Convertisseur PIF - Visualisation des données");
this.setSize(900, 600);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLocationRelativeTo(null); // Centre la fenêtre
this.setResizable(true); // on autorise le resize (plus moderne)
this.setResizable(true); // on autorise le resize
// Initialisation des panels
@@ -56,8 +53,8 @@ public class ConverterWindow extends JFrame {
// Je gere le panel principal
JPanel contentPanel = new JPanel();
contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));
contentPanel.setBackground(new Color(255, 0, 0)); // rouge vif pour demo
contentPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));
//contentPanel.setBackground(new Color(255, 0, 0)); // rouge vif pour demo
contentPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
// Titre
JLabel header = new JLabel(" Convertisseur PIF Visualisation des données ");
@@ -65,18 +62,17 @@ public class ConverterWindow extends JFrame {
header.setAlignmentX(Component.CENTER_ALIGNMENT);
contentPanel.add(header);
contentPanel.add(Box.createRigidArea(new Dimension(0, 20))); // espace
contentPanel.add(Box.createRigidArea(new Dimension(0, 5))); // espace
// Ajout du panel daperçu
// Ajout du panel d'aperçu
contentPanel.add(imagePreviewPanel);
contentPanel.add(Box.createRigidArea(new Dimension(0, 20)));
contentPanel.add(Box.createRigidArea(new Dimension(0, 5)));
// Ajout du panel des fréquences
contentPanel.add(frequencyTablePanel);
contentPanel.add(Box.createRigidArea(new Dimension(0, 20)));
contentPanel.add(Box.createRigidArea(new Dimension(0, 5)));
// Ajout panel des codes
contentPanel.add(codeTablePanel);
contentPanel.add(Box.createRigidArea(new Dimension(0, 20)));
contentPanel.add(Box.createRigidArea(new Dimension(0, 5)));
// la section du scrollpane
JScrollPane scrollPane = new JScrollPane(contentPanel);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);