Skip to content

Commit 333e8cb

Browse files
hansonrhansonr
authored andcommitted
adds AsyncDialog.showMessageDialog(frame, message, title, action)
1 parent b39255e commit 333e8cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sources/net.sf.j2s.java.core/src/javajs/async/AsyncDialog.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ public void showMessageDialog(Component frame, Object message, ActionListener a)
105105
process("" + message);
106106
}
107107

108+
public void showMessageDialog(Component frame, Object message, String title, ActionListener a) {
109+
setListener(a);
110+
JOptionPane.showMessageDialog(frame, message, title, JOptionPane.INFORMATION_MESSAGE);
111+
unsetListener();
112+
if (/** @j2sNative false || */true)
113+
process("" + message);
114+
}
115+
108116
public void showOptionDialog(Component frame, Object message, String title, int optionType, int messageType,
109117
Icon icon, Object[] options, Object initialValue, ActionListener a) {
110118
actionListener = a;

0 commit comments

Comments
 (0)