-
Resize event?
Is there a listener that can detect when a Frame/JFrame is resized?
I know that WindowListener can tell when a frame is minimized/restored, but I would like to know when say the dimensions of the frame go from 100,100 to 150,150. I tried overriding the setSize and setBounds methods to detect it, but that only works for explicit calls to the method, not if the user resizes the frame manually.
Anyone have any ideas?
:)
-
I guess i will give this a shot crptc. You could either add a ComponentListener to the JFrame or you could just add a Component adapter. I would probably go with the adapter since you are just interested in listening for one event.
Code:
Event Listener Methods:
componentHidden(ComponentEvent evt)
componentMoved(ComponentEvent evt)
componentResized(ComponentEvent evt)
componentShown(ComponentEvent evt)