public static int showYesNoCancelDialog(Frame frame, String title, String message) throws GUIException {
YesNoCancelEventListener listener = new YesNoCancelEventListener();
Dialog dialog = (Dialog) WidgetFactory.getInstance().constructWidget(DialogUtils.class, "YesNoCancelDialog", listener);
Label label = (Label) dialog.getWidget("DialogCaption");
label.setProperty("text", message);
dialog.initDialog(frame);
dialog.setProperty("title", title);
dialog.show();
return listener.getResult();
}