/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent aevt) {
ModalProgress mp = new ModalProgress(new DemoProgress());
if (aevt.getActionCommand().equals("Standard Progress")) {
mp.setTitle("Standard Demo Progress");
mp.setMessage("Currently at __current__ out of __max__...");
} else {
mp.setIndeterminate(true);
mp.setTitle("Indefinite Demo Progress");
mp.setMessage("Don't know when, but this will finish sometime...");
}
if (mp.start())
ModalDialog.showPlainDialog("Done", "The task has been completed!");
else
ModalDialog.showWarningDialog("Cancelled", "The task was cancelled!");
}