How to Resize an Applet in NetBeans 6.7

I was expecting a stable release of Netbeans 6.7 before starting to use it for my Java programming.

I would like to resize the applet in NetBeans 6.7.

When I run the java file by pressing SHIFT + F6, it opens the applet, but the dimensions are too small, I think they are about 300 X 300.

How to change these sizes?

+4
source share
4 answers

Go to the project properties, select the application → Web start, select the applet handle and click the Applet Settings button. There you can set the required dimensions.

+5
source

Or use the Resize () parameter to resize the applet at startup. Put the size (width, heaght) in the init () of your applet.

+5
source

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

When you create a Java applet in NetBeans, the NetBeans IDE automatically creates a linked HTML file that controls the size of the applet's launch. If you want to override this, you cannot just edit the created HTML file, as it will be overwritten every time the applet is executed. Do this instead:

Copy the generated HTML file from the build folder to the src folder, then If necessary, edit the HTML file in the src folder. This HTML file will work as an override file and will not be overwritten by the IDE.

+1
source

This answer is incorrect. Use the Resize () parameter to resize the applet at startup. Put the size (width, heaght) in the init () of your applet.

0
source

All Articles