Have you worked with Swing and AWT components at all? Before you can add a JTextArea
, you should probably have a JPanel
, and before that, you need a top level container
The links I used there link you to tutorials; if you want the class documentation, see here:
The general idea is that you add the JTextArea to a JPanel, and then add the JPanel to a top level Container, such as a JFrame or JDialog. All of those objects have a plethora of methods and fields to aid you in laying out and displaying your program.
Also, note that questions about Swing and AWT components as well as GUI's should be asked here.