disable access to first window while accessing second window

hi,

Im using netbeans 5.5 with JDK 6u1.

I have a swing application where, when I click on "new" on main window another window pops up to enter the values. when this happens I need to disable access to the first main window while the second one(popped up window) is still active. how do I do this...

p.s - I dont want to dispose or hide the first window I just need to disallow access while the second is active & allow access when the second one is either closed or pressed "ok".

Thanks

Cheers

[535 byte] By [AlienXa] at [2007-11-27 9:27:36]
# 1
> when I click on "new" on main window another window pops up to enter the valuesmake this other window a modal JDialog
Michael_Dunna at 2007-7-12 22:29:54 > top of Java-index,Desktop,Core GUI APIs...
# 2
hi,this second window is another jFrame which has some swing componants buttons, labels, textboxes... etcIs there noway I can achieve this task while maintaining it as another jFrame rather than a model jDialogthanks
AlienXa at 2007-7-12 22:29:54 > top of Java-index,Desktop,Core GUI APIs...
# 3
> Is there noway I can achieve this task while maintaining it as another jFrame rather than a model jDialogEvery other application in the known universe uses a modal JDialog for this. Why do you think you need to be different?
camickra at 2007-7-12 22:29:54 > top of Java-index,Desktop,Core GUI APIs...
# 4

aha,

Sorry I misunderstood... :)

It works fine. thanks alot.

but some other things to ask. I have this new jDialog in a new package (which is not in the one that main jFrame is in). It seems I have to make a new jFrame in this new package & then add jDialog to it.

So if that is also done. How do I dispose both this new jFrame & new jDialog using a button on a jDialog.

Hope its clear.

AlienXa at 2007-7-12 22:29:54 > top of Java-index,Desktop,Core GUI APIs...
# 5
> It seems I have to make a new jFrame in this new package & then add jDialog to it.You just use your main JFrame as the owner of the dialog.
camickra at 2007-7-12 22:29:54 > top of Java-index,Desktop,Core GUI APIs...