title: Java Applet Windows size in Eclipse
body: <p>I am trying to set the size of an Applet Window to 500 by 500, but I couldn't be able to achieve that.
  Here is my code,</p>
  
  <pre><code>  public void init() { 
      // Start Screen Color 
      setBackground(Color.RED);
      this.setSize(new Dimension(500,500));
  
      width=getSize().width;
      height=getSize().height;
  
      running=false;
      repaint();
      offscreenImage = createImage(width,height);
      offscreenGraphics = offscreenImage.getGraphics();
      addKeyListener(this);    
      addFocusListener(this);
  
      waitingForSpace=false;
  
      repaint();
    }
  </code></pre>
  
  <p>When I pressed CTRL+F11 in Eclipse I get the output Window with size 200 by 200, Why I try to run the program like 5 to 10 times, sometimes the window returns with the 500 by 500 size while some time the window size is 200 by 200.</p>
  
  <p>I do not understand why the size of the window i changing since I am not changing any code at all.
  I want the size to remain at 500 by 500</p>