Как закрыть jframe в Java с помощью оператора IF
Jframe frame = new Jframe();
int count = 0;
if(count==10){
frame.setVisable(false);
frame.dispose();
}
Vast Vulture
Jframe frame = new Jframe();
int count = 0;
if(count==10){
frame.setVisable(false);
frame.dispose();
}
setVisible(false); //you can't see me!
dispose(); //Destroy the JFrame object
To terminate/close a frame in AWT, use the 'dispose()' method
"frameObject.dispose()"
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));