mis a jour selon ma comprehenssion

This commit is contained in:
AlgaLaptop
2026-01-07 20:30:37 +01:00
parent 8c6dcec3df
commit 0291e9b0dd
5 changed files with 103 additions and 26 deletions
+15 -1
View File
@@ -16,6 +16,7 @@ public class ConverterWindow extends JFrame {
private ImagePreviewPanel imagePreviewPanel;
private FrequencyTablePanel frequencyTablePanel;
private CodeTablePanel codeTablePanel;
private JPanel bottomPanel;
/**
* Constructeur de la fenêtre du convertisseur.
@@ -109,7 +110,7 @@ public class ConverterWindow extends JFrame {
ExportButtonListener listener = new ExportButtonListener(controller);
saveBtn.addActionListener(listener);
JPanel bottomPanel = new JPanel();
this.bottomPanel = new JPanel();
bottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
bottomPanel.add(saveBtn);
@@ -118,4 +119,17 @@ public class ConverterWindow extends JFrame {
revalidate();
repaint();
}
/**
* Retire le bouton d'export apres la sauvegarde.
* Utilise dans le cas ou un chemin de sortie est fourni en argument.
*/
public void removeSaveButton() {
if (bottomPanel != null) {
remove(bottomPanel);
bottomPanel = null;
revalidate();
repaint();
}
}
}