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:
Yes, you can do this by implementing WindowListener methods namely windowIconified(WindowEvent e) by windowDeiconified(WindowEvent e).
WindowListener
windowIconified(WindowEvent e)
windowDeiconified(WindowEvent e)
For more details, visit this