0

I would like to have a loop that creates a JFrame, sets it visible and waits until that JFrame is disposed of before creating another. Is this possible? A solution would be greatly appreciated I can't seem to figure this one out.


ex:

for(int i=0; i<5; i++){
    JFrame foo = new Jframe();
    foo.setVisible(true);
    while(foo.isVisible){
        wait();
    }
}
2
Contributors
2
Replies
6
Views
5 Years
Discussion Span
Last Post by woodenduck
0

Uhm, use a JDialog, in modal mode?

Thank you, I feel a little dumb now I completely forgot JDialog existed... That worked perfectly.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.