How to detect JFrame window minimize and maximize events?

后端 未结 3 1164
北荒
北荒 2021-01-02 12:05

Is there a way to an event listener to a JFrame object to detect when the user clicks the window maximize or minimize buttons?

Am using the JFrame object as follows:

3条回答
  •  隐瞒了意图╮
    2021-01-02 12:08

    Yes, you can do this by implementing WindowListener methods namely windowIconified(WindowEvent e) by windowDeiconified(WindowEvent e).

    For more details, visit this

提交回复
热议问题