Creating and Running Java Applets in JBuilder

When JBuilder is loaded, the main menu is displayed.  Click File and then click New on the dropdown menu.  On the resulting window, click on Applet

 

On the ensuing screen, enter your file name in the file input box.  Be sure to include the .jpr extension.  The other fields are optional.  When you are done, click on the Finish button.

 

On the resulting screen, titled "Applet Wizard: Step 1 of 3," delete the package name, and enter your class name in the Class input field.  The class name must be the same as your file name (without the .jpr extension) or you will get an error message later.  When you are done, click the Finish button.  (If you click Next> and get another screen, just click Finish on that screen to continue.)

 

The main editing window will appear next.  To edit your program, double click the .java file listed in the upper left pane.  It will open your java program in the right pane.  Click Edit then Select All to choose all of the provided code, and then click Edit then Cut to delete that code.

Enter your program, and when you are finished save the code by clicking either File then Save, or File and Save Project.  To run your program click the on the menu bar.  Before you exit JBuilder, be sure to click File and Save Project.

To run your program again, click File, then Open, then select the .jpr file.

 

 

 

Note:

If you get an error message when you run your program that indicates that you should use the "-sync" option, click Project, then Properties, then the Compiler tab, and then click "Synchronize output directories."