3

I read that this is a tricky question because an applet is run in the browser. But I would like my applet window to always maintain the same size. (Right now working with Eclipse I can slide the size of the window.)

For the moment I only do this:

public class myJApplet extends JApplet{
  public void init() {
     this.setSize(800, 480);
  }
}

Is there a way to add a this.setResizable(false)?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Jason Rogers
  • 19,194
  • 27
  • 79
  • 112

1 Answers1

4

Set the size of the applet in the HTML. E.G.

<html>
<body>
<applet code="myJApplet" width="800" height="480">
</applet>
</body>
</html>

The applet will still be resizable when the HTML is loaded in the AppletViewer, but that is not relevant to deployment.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433