samedi 2 mars 2019

How to do an if else statement checking for a JFrame open or not? [duplicate]

This question already has an answer here:

I was just curious as to how you can create an if else statement to check when a window is closed using java.swing

JFrame mainWindow = new JFrame("test window")
if(mainWindow.is_open){
    System.out.println("open")
} else{
    System.out.println("close")
}

Aucun commentaire:

Enregistrer un commentaire