I would like to have a typical JFrame, and then have a menu to open a new "popup" window. I can handle the main frame and the menu, but the new JFrame? I want to be "attached" to the other JFrame. Examples of these windows are everywhere, I want it to work just like a "Properties box". As it is now, when I click my button a new Frame is created, but it is not attached to the other one. I want the main frame to be disabled (I can do that) when the properties frame comes up, but I would rather it not create a new item in the taskbar. Specifically, I would like for whenever I click on the main frame in the taskbar, the properties window stays on top when it is open.
Originally posted by Eric Crockett: That looks about right, as long as I can add JTextFields, JLists, JButtons etc to a panel (or just the Dialog itself) then that IS exactly what I want!
A JDialog behaves exactly the same as a JFrame as far as setting layouts and adding components.
Prior to Java 1.5, you had to get a frame/dialog's content pane using getContentPane(). This Container could then be used to set the layout and add components just as regular containers like JPanel. In Java 1.5 and up, you can set the layout of the frame/dialog directly, as well as add components. This will basically use the content pane in the background.
So if you already have a panel, you can call dialog.getContentPane().add(panel), or even dialog.setContentPane(panel).
I have been messing around with JInternalFrame, any comment on why one would be better than the other?