Compiling and Running Your Program

See Also

This section shows you how to run and execute your newly created Java program.

Now that you have created the user interface and the connections between the components, you can compile and run your application.

To compile and run the program:

  1. Compile ColorSwitch by choosing Build and chooose Compile.

    If the build is successful, the "Finished ColorSwitch" message appears in the status bar in the main window. If there are problems with the build, error messages are displayed in the Output window. You can double-click an error message to jump to the line in the source code where the error occurred. Once the build is successful, you can run the application.

  2. Run ColorSwitch by choosing Build and chooose Execute.

    If there are no execution errors, the IDE displays the Execution View and output windows

    The ColorSwitch application is displayed:


  3. an image of the Colorswitch application

  4. In the application, click the button three times to check that the label area above the button changes from light gray to medium gray to black.
  5. Exit the application.
Next:  Stepping Through the Code
Back:  Adding Event Handler Code
See Also
Compiling and Running Java Programs

Legal Notices