Compiling and Running Your 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, "Finished ColorSwitch" 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 switches to the running workspace and 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 changes from light gray to medium gray to black.
  5. Exit the application.
Next:  Stepping Through the Code
Back:  Adding Event Handler Code

Legal Notices