private JPanel createButtonPanel() {
JPanel bottom = new JPanel();
bottom.setLayout(new BorderLayout());
bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "cancel"));
//$NON-NLS-1$ //$NON-NLS-2$
cancelButton.addActionListener(this );
cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "ok"));
//$NON-NLS-1$ //$NON-NLS-2$
okButton.addActionListener(this );
okButton.setActionCommand("OK"); //$NON-NLS-1$
okButton.setDefaultCapable(true);
getRootPane().setDefaultButton(okButton);
ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help"));
// associate with JavaHelp
HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba");
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));
buttonPanel.add(okButton);
buttonPanel.add(cancelButton);
buttonPanel.add(helpButton);
bottom.add(buttonPanel, BorderLayout.EAST);
return bottom;
}
|