Close Java Operation

Using frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); can hide the window. but how could I display another window after that?

When I click the close button in a java swing application, I need to hide this window and display another window in my application. How can i do this?

+6
source share
1 answer

You need to write a window listener .

+4
source

Source: https://habr.com/ru/post/915361/


All Articles