1 / 27

Creating an Application: The AppBuilder for Java IDE

Creating an Application: The AppBuilder for Java IDE. Objectives. After completing this lesson, you should be able to do the following: Create new projects and applications in AppBuilder for Java Build and execute Java applications Modify Java application source code. Overview.

darva
Télécharger la présentation

Creating an Application: The AppBuilder for Java IDE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating an Application: The AppBuilder for Java IDE

  2. Objectives • After completing this lesson, you should be able to do the following: • Create new projects and applications in AppBuilder for Java • Build and execute Java applications • Modify Java application source code

  3. Overview • This lesson introduces the AppBuilder for Java Integrated Development Environment (IDE) • Building, debugging, and deploying Java applications, applets, and JavaBeans • Wizards to help build source code • User interface designer • Database connectivity components

  4. 1 2 3 4 The AppBuilder Environment

  5. Creating a New Project • Select File—>New Project from the Menu

  6. Specifying Project Details: Step 1 • Specify project details:

  7. Specifying Project Details: Step 2 • Specify optional project details:

  8. Specifying Project Details: Final Step • Choose one of the following options:

  9. Creating a New Java Application • Select File—>New from the Menu bar • Double-clickApplicationicon

  10. Specifying Application Details • Specify details in Application Wizard: • Thenclick OK

  11. Specifying Frame Details • Specify details in Frame Wizard: • Then click OK

  12. The Skeleton Java Application • Contains application and frame classes, plus HTML file

  13. Building and Executing the Application • Select Project—>Make Project to compile .java files into .class files • Select Run—>Run to launch application • Creates an application object • Creates a frame object • The frame object deals with the user interface

  14. The Application Class • The top-level class in the application • Contains the main() method • Select theapplication class • View code inContent Pane

  15. Finding Methods and Attributes • Use the Structure Pane to find methods and attributes in a class • Select item in Structure Pane

  16. The Frame Class • Defines the appearance and behavior of the user interface 1 2

  17. 1 2 3 Adding Palette Components to the Frame

  18. Specifying Component Properties • Select View—>Inspector to view or edit the properties of a component 1 2

  19. Using the Help System • Provides help on all development aspects • Select Help—>Help Topics 1 2

  20. Finding Help Topics • Master Index tab gives access to all topics 1

  21. Debugging Programs with AppBuilder for Java • AppBuilder for Java provides a sophisticated debugger • The debugger provides the following capabilities: • Step over, or trace into, a method • Set conditional breakpoints • Examine and modify “watch” variables

  22. 1 Using the Debugger • Click the Debug icon to debug an app

  23. Stepping Through a Program • You can step through a program using the buttons on the Debugger toolbar • Execute the program • Step over a method call • Trace into a method call • Pause execution • Stop the debugger

  24. Setting Breakpoints • To set a breakpoint: • Select a line of code in the Source pane • Click with the right mouse button • Select Toggle Breakpoint from the pop-up menu • To run to the next breakpoint, select the Run button on the Debug toolbar

  25. Watching Variables • You can examine and modify local variables in the Data pane • To watch other variables: • Select a variable in the Source pane • Click with the right mouse button • Select Add Watch at Cursor from the pop-up menu • View the variable in the “Watch” pane

  26. Summary • AppBuilder for Java can be used to build, debug, and deploy Java applications, applets, and JavaBeans • A new application in AppBuilder has three files: • Application class, contains main() • Frame class, defines UI • HTML file

  27. Practice 1-1 Overview • Opening the final solution project, to gain familiarity with the goal of the practice sessions • Creating a new project in AppBuilder for Java • Adding a simple application • Building and running the application

More Related