If you include it in a JScrollPane that might solve your problem :
JTextArea textArea = new JTextArea(50, 50);
JScrollPane scrollPane = new JScrollPane( textArea );
You might also have to change you Layout, because by default I think it use the BorderLayout
that expands your components. Or put it in PAGE_START
like this :
add(new JScrollPane(new JTextArea(50, 50)), BorderLayout.PAGE_START);