954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need help with a loop and JFrame window

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();
    }
}
woodenduck
Newbie Poster
20 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Uhm, use a JDialog, in modal mode?

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 
Uhm, use a JDialog, in modal mode?

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

woodenduck
Newbie Poster
20 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: