import javax.swing.*;
class Window extends JFrame
{
public static void main ( String[] args)
{
JPanel pnl = new JPanel() ;
public Window()
{
super( "Swing Window" ) ;
setSize( 500, 200 ) ;
setDefaultCloseOperation( EXIT_ON_CLOSE ) ;
add( pnl ) ;
setVisible( true ) ;
}
Window gui = new Window() ;
}
}
According to Bluej, the public Window() is in correct, with the specific error being "illegal start of expression". Any ideas where I went wrong?