question.centerIn(settingsPanel, header.getBottom() + 10);
settingsPanel.add(question);
last = new Point(last.x, question.getBottom());
cancelButton = new LButton("Cancel");
cancelButton.setLocation(15, settingsPanel.getHeight() - cancelButton.getHeight() - 10);
cancelButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (testCancel()) {
int answer = JOptionPane.showConfirmDialog(null, "Are you sure you want to cancel?", "Confirm Cancel",
JOptionPane.YES_NO_OPTION);
if (answer == JOptionPane.YES_OPTION) {
onCancel();
cancelPanel.open();
}
}
}
});
settingsPanel.add(cancelButton);
backButton = new LButton("Back");
backButton.setLocation(settingsPanel.getWidth() / 2 - backButton.getWidth() / 2, settingsPanel.getHeight() - backButton.getHeight() - 10);
backButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (testBack()) {
onBack();
backPanel.open();
}
}
});
settingsPanel.add(backButton);
nextButton = new LButton("Next");
nextButton.setLocation(settingsPanel.getWidth() - nextButton.getWidth() - 15, settingsPanel.getHeight() - cancelButton.getHeight() - 10);
nextButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {