Scrollable text area

How do I include a scrollable text area in a plugin using a class extended by MMFrame?
The following only adds the scroll bar after the text area and the text area is not scrollable:

JTextArea textarea = new JTextArea(100, 100);
JScrollPane scroll = new JScrollPane(textarea);      
scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
super.add(textarea,"cell 0 11, span");
super.add(scroll);

Hi,

Since “textarea” has already been added to “scroll” you don’t want to do “super.add(textarea, …”. Just add the scroll pane to the main layout.

P.S. this doesn’t have to do with anything specific to Micro-Manager so it probably makes more sense to ask questions like this in the Java section of StackOverflow .