panel.add(new Label(), layout);
layout.weighty = 0;
layout.gridy++;
// Add a label for the "keep old camo" button.
panel.add(new AdvancedLabel(Messages
.getString("CamoChoiceDialog.keep_old_camo")), layout); //$NON-NLS-1$
layout.gridy++;
// Create the "keep old camo" button.
keep = new ImageButton();
keep.setLabel(Messages.getString("CamoChoiceDialog.no_camo")); //$NON-NLS-1$
keep.setPreferredSize(84, 72);
keep.addActionListener(new ActionListener() {
// Pressing this button closes without saving.
public void actionPerformed(ActionEvent event) {
close();
}
});
keep.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent event) {
// Pressing enter on this button closes without saving.
if (KeyEvent.VK_ENTER == event.getKeyCode()) {
close();
}
}
});
panel.add(keep, layout);
layout.gridy++;
// Add a label for the "select new camo" button.
panel.add(new AdvancedLabel(Messages
.getString("CamoChoiceDialog.select_new_camo")), layout); //$NON-NLS-1$
layout.gridy++;
// Create the "select new camo" button.
select = new ImageButton();