Exception in thread "main"
<blockquote>
  <p>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      Syntax error on token "]", invalid (</p>
</blockquote>

<p>That's the error message I get.
This is my code:</p>

<pre><code>import java.awt.*;
import java.util.Random;
import java.awt.event.*;
import javax.swing.*;  //notice javax
public class Frame1 extends JFrame
{
  JPanel pane = new JPanel();
  Frame1() // the frame constructor method
  {
    super("Harry's Random Number Generator"); setBounds(100,100,300,100);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container con = this.getContentPane(); // inherit main frame
    con.add(pane); // add the panel to frame
    // customize panel here
    // pane.add(someWidget);
    setVisible(true); // display this frame
  }
  public static void main(String args[]) {new Frame1();}
    Random dice = new Random();
    int number;{

    for(int counter=1; counter&lt;10;counter++){
        number = 1+dice.nextInt(1000);
        System.out.println(number + " ");
    }

    }

}
</code></pre>
