Many other layout managers will also resize components in respect to their parents. BorderLayout is also very good at this. (at least for the component in the CENTER region) Even if you have no layout manager, you can attach a ComponentListener to the parent component and listen for resize events and resize the child component.
A lot of layout managers work off the preferred size of the child components... if you are having trouble with a component not sizing correctly, see what dimensions getPreferredSize() is returning.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Feb 18, 2003
I guess that is my question. Is there an example of how to listen for resize events? I tried WindowAdapter and didn't find I want I neeeded there.