U need to use any layout , for example BorderLayout and add your
textArea into contentPane or any Panel with your Layout.
Example :
Panel panel = (JPanel) frame.getContentPane();
Or
You get a panel by other way.
And create a BodrerLayout (See the Doc of that class to know it
attributes CENTER, East , West, North, South)
TextArea textArea= new TextArea();
panel.setLayout(new BorderLayout());
Pane.add(textArea, BorderLayout.CENTER);