From 45699130797251943654963ec10a5610786dc2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Clermont=C3=A9?= Date: Tue, 7 Jun 2016 23:57:28 +0200 Subject: [PATCH] Issue#18 Used WindowBuilder to set tab label --- src/org/dclermonte/siba/gui/SibaGUI.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/org/dclermonte/siba/gui/SibaGUI.java b/src/org/dclermonte/siba/gui/SibaGUI.java index 2bb5552..722be1f 100644 --- a/src/org/dclermonte/siba/gui/SibaGUI.java +++ b/src/org/dclermonte/siba/gui/SibaGUI.java @@ -170,14 +170,11 @@ public class SibaGUI this.backupPanel = new BackupPanel(); this.backupPanel.setBackground(new Color(0, 255, 0)); - String backup = BackupPanel.BUNDLE.getString("BackupPanel.TitleBackupPanel.text"); - tabbedPane.addTab(backup, null, this.backupPanel, null); - + tabbedPane.addTab(BUNDLE.getString("BackupPanel.TitleBackupPanel.text"), null, this.backupPanel, null); //$NON-NLS-1$ CheckPanel checkPanel = new CheckPanel(); checkPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); checkPanel.setBackground(new Color(144, 238, 144)); - String check = BackupPanel.BUNDLE.getString("BackupPanel.TitleCheckPanel.text"); - tabbedPane.addTab(check, null, checkPanel, null); + tabbedPane.addTab(BUNDLE.getString("BackupPanel.TitleCheckPanel.text"), null, checkPanel, null); //$NON-NLS-1$ this.frmSimpleBackup.setFont(new Font("DejaVu Sans", Font.BOLD, 12)); this.frmSimpleBackup.setForeground(new Color(0, 100, 0)); this.frmSimpleBackup.setBackground(new Color(102, 205, 170)); @@ -223,17 +220,13 @@ public class SibaGUI public void actionPerformed(final ActionEvent e) { tabbedPane.setSelectedIndex(1); - File result; - CheckPanel.choosenFile = CheckDirectorySelector.showSelectorDialog(null, null); if ((CheckPanel.choosenFile != null) && CheckPanel.choosenFile.exists()) { CheckPanel.textField.setText(CheckPanel.choosenFile.getName()); - result = CheckPanel.choosenFile; } else { - result = null; } } }); @@ -323,7 +316,6 @@ public class SibaGUI logger.info("SibaException chainée = " + sibaException.getCause().getMessage()); // dataMissing.concat(sibaException.getCause().getMessage()); } - String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text"); JOptionPane.showMessageDialog(null, dataMissing, titleWarning, JOptionPane.INFORMATION_MESSAGE); }