JFrame and Dialog
Hello all
I have a JFrame. In this frame, I have button to open a new Window to show the list of items (of course, I need to select a item in it). What I want is that I need to access both this new window and my main frame (e.g. can click on a button in main Frame when the new Window is open)
What kind of Window should I use. I tried to use JDialog. However, if I use dialog, I cannot click any thing in my main frame.
How I can fix this
Many thanks
[482 byte] By [
suhua] at [2007-11-27 8:12:55]

# 1
> What kind of Window should I use. I tried to use> JDialog. However, if I use dialog, I cannot click any> thing in my main frame.You can use a JDialog, just call it in a non-modal way.
# 2
It's all in how you call the JDialog constructor. This determines whether the JDialog is modal or not. Have a look here at the constructor:
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JDialog.html#JDialog(java.awt.Dialog,%20java.lang.String,%20boolean)
The last parameter "boolean modal" is the one you're after.