Description & Source Code

ZK Messagebox comes with a set of configurations for its various different use cases, such as confirm, warning, and information dialog. It provides four built-in images, they're "warning", "question", "information", and "error", shown in this demo.
This configuration is easily done by supplying the Messagebox's show method with different fields.
Update : Developers can simply create confirm dialog by judging the type of events.
About the events' name, please refer to Component Reference - Messagebox

	<vlayout spacing="15px">
		Message Dialog
			<button label="Warning" width="100px">
				<attribute name="onClick"><![CDATA["Warning is pressed", "Warning", Messagebox.OK, Messagebox.EXCLAMATION);
			<button label="Question" width="100px">
				<attribute name="onClick"><![CDATA["Question is pressed. Are you sure?", "Question", Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION);
			<button label="Information" width="100px">
				<attribute name="onClick"><![CDATA["Information is pressed", "Information", Messagebox.OK, Messagebox.INFORMATION);
			<button label="Error" width="100px">
				<attribute name="onClick"><![CDATA["Error is pressed", "Error", Messagebox.OK, Messagebox.ERROR);
		Interactive Dialog
		<button label="Save " width="100px">
			<attribute name="onClick"><![CDATA["Are you sure to save?", "Confirm Dialog", Messagebox.OK | Messagebox.IGNORE  | Messagebox.CANCEL, Messagebox.QUESTION, new org.zkoss.zk.ui.event.EventListener() {
	public void onEvent(Event evt) throws InterruptedException {
		if (evt.getName().equals("onOK")) {
			alert("Data Saved !");
		} else if (evt.getName().equals("onIgnore")) {"Ignore Save", "Warning", Messagebox.OK, Messagebox.EXCLAMATION);
		} else {
			alert("Save Canceled !");