JTextArea is making cells bigger with TableLayout

I've added a JTextArea onto a JPanel which has TableLayout as its layout manager. I've attached a JScrollPane onto the JTextArea.

Im trying to make the scroll pane do its job when the text becomes too much for the cells' allocation for the JTextArea. Right now its just making the cells bigger which forces the whole GUI to scroll downwards (or sideways) as opposed to just the JTextArea scrolling and leaving the cell sizes the same.

Hope im making sense.

Any ideas?

[496 byte] By [Bakumbaa] at [2007-10-2 16:35:31]
# 1
You add the table to the scrollPane. Then you add the scrollPane to the panel. I've never used the TableLayout, but you may also need to set the preferredSize of the scrollPane.
camickra at 2007-7-13 17:41:09 > top of Java-index,Desktop,Core GUI APIs...
# 2
you mean add the JTextArea to the scrollPane?
Bakumbaa at 2007-7-13 17:41:09 > top of Java-index,Desktop,Core GUI APIs...
# 3
> you mean add the JTextArea to the scrollPane? Yes.
camickra at 2007-7-13 17:41:09 > top of Java-index,Desktop,Core GUI APIs...
# 4
panel7.add(dNameInstructionsField, "0, 9, 2, 17, f, f");panel7.add(new JScrollPane(dNameInstructionsField), "0, 9, 2, 17, f ,f");thats what i had...not sure if its what you meant.Thanks
Bakumbaa at 2007-7-13 17:41:09 > top of Java-index,Desktop,Core GUI APIs...
# 5
anyone else got ideas?thanks
Bakumbaa at 2007-7-13 17:41:10 > top of Java-index,Desktop,Core GUI APIs...
# 6
Hi,sure that the size of the corresponding column and row was set to TableLayout.FILL (you specify this by calling the constructor of TableLayout)? I have got the same effect if I had set the size to TableLayout.PREFERRED ...
stewerta at 2007-7-13 17:41:10 > top of Java-index,Desktop,Core GUI APIs...