Richard Henderson wrote:I'm using setLayout(null) because I couldn't get the full version of this frame to work properly with a layout manager. I set the layout manager to null and then manually added all the labels and panels to the frame. That's why I've used setBounds, instead of setSize. So i'm stuck with layout null.
In that case the correct thing to do is fix the layout problem. Null layout will always give you infinite grief
Richard Henderson wrote:
So, I should create another panel which just the textarea and scroll pane will sit in? And set the layout for that to Border?
Then eg: panel.add(textArea); and panel.add(scrollPane);?
No. Its nested children.
Notice the correct use of layout manager on line 1.
Now you can add the parent to whatever you want (even set it as the frame's content pane if you wish to)