JTextAreaProblem
i am trying to create a Graphical User Interface using a JTextArea method in a java application
At the moment i have only included one panel in it at the moment but am going to add more later
import java.awt.*;
import javax.swing.*;
public class Marina extends JFrame
{
//This is a Graphical User Interface built in a Java application for the java revisited courrsework
//i am using a JtextArea in order to create the graphical User Interface
JTextArea Gui = new JTextArea(60, 30);
public Marina() {
//.I am now using panels to edit the gui
JPanel panel1 = new JPanel();
panel1.setLayout(new BorderLayout());
panel1.add(BorderLayout.CENTER);
//... Set window characteristics.
this.setContentPane(panel1);
this.setTitle("Marina");
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.pack();
}
//the main method for my program
public static void main(String[] args){
JFrame frame1 = new Marina();
Marina.setVisible(true);
}
}
I get these errors from the program
panel1.add(BorderLayout.CENTER);
^
H:\Marina.java:34: non-static method setVisible(boolean) cannot be referenced from a static context
Marina.setVisible(true);
basically i just need to know how to solve these errors so that i can display a simple JtextArea on the screen

