How to pop up a dialog window?
Brought to you by:
zander
|
From: FCG HU Z. <Zhe...@al...> - 2005-11-14 12:42:42
|
hi, =20 I am writing my own main window, that is, I used mainFrame =3D new JFrame(...) to create my own main window, and used mainFrame.getContentPane().add(...) to add my own Panel (subclass of the class generated by UIC, which is a subclass of JPanel) to the main window. I have a button on the main window, and I would like to pop up a modal dialog window whenever the button is pressed. Should I create the dialog window in QtDesigner as a Widget or Dialog? And how could I let the dialog pop up? If I create the dialog window as a Dialog, the generated class is a subclass of JDialog, but I can not find a way to set its parent. The constructor JDialog(Frame parent, String title, boolean modal) is not visible to my code. Maybe I need to make it a Widget, and then add it to the ContentPane of a new JDialog(parent, title, true)? - James |