// We use the message box resource for our button texts
resourceCollection = ResourceCollectionMgr.getDefaultInstance().getResource(SwingUtil.RESOURCE_COMMON, JMsgBox.class);
// Create scroll areas for the various sections of the dialog
JScrollPane treeScrollPane = new JScrollPane();
treeScrollPane.setBorder(new ShadowBorder());
widgetScrollPane = new JScrollPane();
widgetScrollPane.setBorder(new ShadowBorder());
descriptionScrollPane = new JScrollPane();
descriptionScrollPane.setBorder(new ShadowBorder());
// Create the control buttons
okBtn = createButton("buttons.ok.caption");
okBtn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
optionDialogCommitted();
optionDialogClosed();
close();
}
});
okBtn.setEnabled(false);
cancelBtn = createButton("buttons.cancel.caption");
cancelBtn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
optionDialogCancelled();
close();
}
});
applyBtn = createButton("buttons.apply.caption");
applyBtn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
optionDialogCommitted();
}
});
applyBtn.setEnabled(false);
JPanel btnPanel = new JPanel();
btnPanel.setBorder(new ShadowBorder());
btnPanel.add(okBtn);
btnPanel.add(applyBtn);
btnPanel.add(cancelBtn);