Processing...
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

messagebox.zul
<zk>
	<vlayout spacing="15px">
		Message Dialog
		<hlayout>
			<button label="Warning" width="100px">
				<attribute name="onClick"><![CDATA[
	Messagebox.show("Warning is pressed", "Warning", Messagebox.OK, Messagebox.EXCLAMATION);
]]></attribute>
			</button>
			<button label="Question" width="100px">
				<attribute name="onClick"><![CDATA[
	Messagebox.show("Question is pressed. Are you sure?", "Question", Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION);
]]></attribute>
			</button>
			<button label="Information" width="100px">
				<attribute name="onClick"><![CDATA[
	Messagebox.show("Information is pressed", "Information", Messagebox.OK, Messagebox.INFORMATION);
]]></attribute>
			</button>
			<button label="Error" width="100px">
				<attribute name="onClick"><![CDATA[
	Messagebox.show("Error is pressed", "Error", Messagebox.OK, Messagebox.ERROR);
]]></attribute>
			</button>
		</hlayout>
		Interactive Dialog
		<button label="Save " width="100px">
			<attribute name="onClick"><![CDATA[
Messagebox.show("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")) {
			Messagebox.show("Ignore Save", "Warning", Messagebox.OK, Messagebox.EXCLAMATION);
		} else {
			alert("Save Canceled !");
		}
	}
});
]]></attribute>
		</button>
	</vlayout>
</zk>