Detecting changes to a JFrame size

Hi,

I am interested in detecting the changes in a JFrame. This is what I would like to do:

Place a JTextArea within the JFrame at a certain initial size, say, 10x10. Then, when the size of the JFrame becomes larger or smaller, have it resize that.

Going on with my example, imagine we then increased the JFrame to take up half of the screen, now instead of having a small 10x10 box, we would have say, a 100x100 box (however we determine this).

I have been able to do this with the WindowStateListener. HOWEVER! It ONLY works if the windows is MAXIMIZED! I need the window to check a change each time the user manually resizes it.

I browsed the docs and it does not appear that any of the classes do this, but maybe I missed them. Can anyone point me in the right direction?

Also, if this is not possible, can you please point me in the direction of writing this feature myself.

Thanks!

[935 byte] By [dayrinnia] at [2007-10-2 20:04:34]
# 1
Use a ComponentAdapter and override thecomponentResized(ComponentEvent) method.It helps to read through the whole API for a given class. Often,especially with swing components, a superclass will implementdesired functionality if the base class does not.
es5f2000a at 2007-7-13 22:44:38 > top of Java-index,Security,Event Handling...