+
+ // Set up one confirmation and alert object to re-use
+ confirmation = new Alert(null);
+ confirmation.setType(AlertType.CONFIRMATION);
+ confirmation.setTimeout(ALERT_TIMEOUT_MS);
+ Command yes = new Command("Yes", Command.OK, 1);
+ confirmation.addCommand(yes);
+ Command no = new Command("No", Command.CANCEL, 1);
+ confirmation.addCommand(no);
+ alert = new Alert(null);
+ alert.setTimeout(ALERT_TIMEOUT_MS);