How to change the Dimensions of the Applet Viewer in NetBeans 6.7

16,173

Solution 1

Go to the project properties, there you choose Application -> Web Start, select Applet descriptor and click the button Applet Parameters. There you can set required dimensions.

Solution 2

Or use the Resize() option to change the applet size when you run. Put the resize(width,heaght) in init() of your applet.

Solution 3

I am using Netbeans 6.9 on Ubuntu 10.10. I also had these problems. Found the advice from http://kbase.advenci.com/doku.php?id=netbeans_java_applet_startup to work.

When you create a Java applet in NetBeans, the NetBeans IDE automatically creates an associated HTML file which controls the startup size of the applet. If you want to override this, you cannot simply edit the generated HTML file, as it gets overwritten each time the applet is run. Do this instead:

Copy the generated HTML file from the build folder to the src folder, then Edit the HTML file in the src folder as needed. This HTML file will function as an override file, and will not be overwritten by the IDE.

Share:
16,173
Ibn Saeed
Author by

Ibn Saeed

Learning things

Updated on June 22, 2022

Comments

  • Ibn Saeed
    Ibn Saeed about 2 years

    I was waiting for the stable release of Netbeans 6.7 before starting to use it for my Java Programming.

    I would like to how to change the Dimensions of the Applet Viewer in NetBeans 6.7.

    When ever i run a java file by pressing SHIFT + F6, it opens an Applet but the dimensions are too small, i think they are around 300 X 300.

    How to change those dimensions ?