How to wait for a JFrame to close.
807600Sep 22 2007 — edited Sep 22 2007I've created a JFrame and set it to visible, but i need to hold my main() until it finishes. I'm using while(EEMain.isVisible()); as a place holder right now, but it just uses up cpu cycles needlessly, i tried
while(EEMain.isVisible()) {
try {
wait(100);
} catch etc.....
to make it a little less cpu intensive, but main() is static and wait() isn't. How can i wait for the JFrame to finish without burning so many cycles?