반응형
WindowListener windowListener = new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent) {
System.out.println("Frame closed");
windowEvent.getWindow().dispose();
}
};
-----------
frame.addWindowListener(windowListener);
public void windowClosing(WindowEvent windowEvent) {
System.out.println("Frame closed");
windowEvent.getWindow().dispose();
}
};
-----------
frame.addWindowListener(windowListener);
반응형