JTextArea Disappeared

Hi all,

I've got a chat application program and the layout is as such, two jtextareas residing in a jpanel in the center(borderlayout), some buttons in the north and some buttons in the south.

When i click on one of the button, which initiates a video conference, i moved the panel with the jtextareas to east and adds my video panel to west. My video came out but the funny thing is my jtextareas and whatever there is in the jpanel (such as jlabels) disappeared. I can still click on the jtextareas(knowing its location) and am still able to type in messages as well as send messages.

I've tried repainting all the panels but it didn't help.. can anyone advice? thanks alot!

[705 byte] By [robannea] at [2007-10-3 2:45:18]
# 1

When a component is in the EAST position the BorderLayout sets it to it's preferred size. Since there is no text in your jtextareas there preferred sizes are small. Try using this constructor when creating the text areas

JTextArea area = new JTextArea(20,40); or play around with setting the minimum and preferred sizes.

mpmarronea at 2007-7-14 20:33:55 > top of Java-index,Desktop,Core GUI APIs...
# 2
> I've tried repaintingWhen you add/remove components from a Container you need to use revalidate() or validate() on the Container so the Components are layed out correctly.
camickra at 2007-7-14 20:33:55 > top of Java-index,Desktop,Core GUI APIs...