If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

OK, so...I did that. And to some extent it works. I've even got two JScrollPane/JTextArea combination working side by side.

However, in order to get them to resize and reposition correctly when the JFrame is resized, I have had to register with the JFrame as a ComponentListener and explicitly call setPreferredSize, setSize, and setLocation. I would like the LayoutManager to be handling all of this. Is there an easier/better way to do this?

Is there perhaps a way to get the LayoutManager to come back through and reposition after I've changed their preferredSize?

I was having trouble finding the right 'hook' within the whole Container/JFrame functionality that would allow me to set the preferredSize (and size/location) of my multiple scrollable JTextArea objects, at the right time, and in a way that didn't interfere with anything else. Then after a good night's sleep it came to me...

It took about 60 seconds to extend the FlowLayout class and cut-and-paste my size/location code into the layoutContainer(Container) method, before calling super.layoutContainer. Bingo. It worked first time, every time.