01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: JDialog.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.swing;
09:
10: import javax.swing.JFrame;
11: import javax.swing.SwingUtilities;
12:
13: public class JDialog extends javax.swing.JDialog {
14: private static final long serialVersionUID = 3351745796334519740L;
15:
16: public JDialog(JFrame owner, String title, boolean modal) {
17: super (owner, title, modal);
18: }
19:
20: public void nonModalShow() {
21: SwingUtilities.invokeLater(new DialogShowThread(this ));
22: }
23:
24: public class DialogShowThread extends Thread {
25: JDialog mDialog = null;
26:
27: public DialogShowThread(JDialog dialog) {
28: mDialog = dialog;
29: }
30:
31: public void run() {
32: mDialog.setVisible(true);
33: }
34: }
35: }
|