Message Boxes

To display messages you can use IOSUIMessageBox, which has the following methods:

- displayMessage(),displayError(),displayWarning() - they have no result and contains only an OK button.

- showMessageDialog() - you can specify which buttons to display and the result will be that button. The button can be specified using IOSUIMessageButton enum.

IOSUIButton btnMessage = new IOSUIButton(new AbstractAction("Message") {
	@Override
	public void actionPerformed(ActionEvent e) {
		IOSUIMessageBox.displayMessage("This is a message !");
	}
});
		
IOSUIButton btnQuestion = new IOSUIButton(new AbstractAction("Question") {
	@Override
	public void actionPerformed(ActionEvent e) {
		IOSUIMessageButton ret = IOSUIMessageBox.showMessageDialog("Please Answer", "Do you like Z ?", IOSUIMessageButton.YES,IOSUIMessageButton.NO, IOSUIMessageButton.CANCEL);
		IOSUIMessageBox.displayMessage("You have answered "+ret);
	}
});
		
btnExit.setBackground(new Color(255,0,0,150));
content.setBackground(Color.WHITE);
IOSUIHeader hdr = IOSUIHeader.createApplicationHeader(2, 1, "Empty IOS UI Application");
hdr.addXY(btnMessage, 1, 1, "c,c");
hdr.addXY(btnQuestion, 2, 1, "c,c");
hdr.addXY(btnExit, 4, 1, "c,c");
IOSUIApplication.startIOSUIApplication(500, 300,content,hdr);