Setting JFrame to be only selectable window
I have a program where you have the main Frame and a secondary Frame that pops up. The secondary Frame holds progress bars. I want to set the secondary frame to be the only selectable frame until it closes on its own. How can I do that? I've been searching Google but no one has an answer that actually works...
Re: Setting JFrame to be only selectable window
Can you use a modal dialog instead of a Frame?
Re: Setting JFrame to be only selectable window
A little bit of messing around and I got it to work. Thanks Norm.
However now I have another question. How can I force close the Dialog when a method is called? I cant seem to find a method related to that.
I'm actually not wanting to do this entire set only selectable window thing. Just realized it is stopping my process from running...
Re: Setting JFrame to be only selectable window
Quote:
Originally Posted by
aussiemcgr
How can I force close the Dialog when a method is called? I cant seem to find a method related to that.
Code :
setVisible(false)
// or
dispose()
Quote:
I'm actually not wanting to do this entire set only selectable window thing. Just realized it is stopping my process from running...
Your "process" (whatever that might refer to) probably shouldn't be running on the EDT in that case.
To get better help sooner, post a SSCCE
link --> SSCCE : Java Glossary
db