Issue#28 Re added empty line in BackupPanel

This commit is contained in:
Didier Clermonté 2016-06-21 22:35:40 +02:00
parent 3c62bc15d0
commit c767d19407
1 changed files with 10 additions and 0 deletions

View File

@ -63,6 +63,7 @@ public class BackupPanel extends JPanel
*/
public BackupPanel() throws SibaException
{
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
setLayout(new BorderLayout(0, 0));
@ -108,13 +109,16 @@ public class BackupPanel extends JPanel
});
choosePanel.add(btnNewButton, "6, 2");
JLabel lblTargetDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblTargetDirectory.text")); //$NON-NLS-1$
choosePanel.add(lblTargetDirectory, "2, 4");
lblTargetDirectory.setVerticalAlignment(SwingConstants.TOP);
lblTargetDirectory.setHorizontalAlignment(SwingConstants.LEFT);
this.targetDirectoryField = new JTextField();
choosePanel.add(this.targetDirectoryField, "4, 4");
this.targetDirectoryField.setColumns(10);
JButton btnNewButton_1 = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text")); //$NON-NLS-1$
btnNewButton_1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
btnNewButton_1.addActionListener(new ActionListener()
@ -122,16 +126,21 @@ public class BackupPanel extends JPanel
@Override
public void actionPerformed(final ActionEvent e)
{
File file = TargetDirectorySelector.showSelectorDialog(BackupPanel.this, null);
if (file != null)
{
BackupPanel.this.targetDirectoryField.setText(file.getPath());
}
}
});
choosePanel.add(btnNewButton_1, "6, 4");
btnNewButton_1.setHorizontalAlignment(SwingConstants.RIGHT);
JPanel actionPanel = new JPanel();
add(actionPanel, BorderLayout.SOUTH);
actionPanel.setLayout(new BoxLayout(actionPanel, BoxLayout.Y_AXIS));
@ -178,6 +187,7 @@ public class BackupPanel extends JPanel
String titleWarning = BUNDLE.getString("BackupPanel.TitleWarning.text");
JOptionPane.showMessageDialog(BackupPanel.this, dataMissing, titleWarning,
JOptionPane.INFORMATION_MESSAGE);
}
}
catch (SibaException exception)