/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package team.rakkstar.application.form;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
/**
*
* @author RAZER08
*/
public class TeamRakkStarApplicationForm extends JFrame
{
public static void main (String[]args)
{
JPanel jp = new JPanel();
JLabel jl = new JLabel();
JTextField jt = new JTextField(30);
JFrame a = new JFrame ("Team rakkStar Application Form");
a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
a.setSize(800,600);
a.setVisible(true);
jp.add(jt);
[color="#FF0000"]add(jp);[/color]
}
}
The error is in red text.
The error says.
non-static method add(Component) cannot be referenced from static context
I'm using NetBeans IDE 7.2.1
Thanks