You can quickly create a project in which to organize your application files, a runnable application class file, and a frame class in which you can lay out UI controls. Then work in JDeveloper's IDE to develop, compile, run, debug, and optimize your application.
Create a New Application and Project: Use the Create Application wizard to create a new application and project for your Java Swing application.
Create a Java Application: Use the Create Java Application dialog to create the skeleton files for your Java Swing application.
Develop the UI: Use the Java visual editor to easily assemble the elements of a user interface (UI) for your Java application using Swing components.
Finish Coding: To finish development, use the Java source editor, which provides functionality such as Java Code Insight and import statement assistance as you edit your source files.
Compile: Build your project utilizing the speed and advanced functionality of the Java Compiler (Javac).
Debug: Use the UI debugger to control the execution of your program while you debug it.
The application control file is the highest level in the organizational structure. It stores information about the objects you are working with, while you are creating your application. It keeps track of your projects and the environment settings while you are developing your Java program. [ tell me more...]
MySwingApplicationto follow along with the example.
Application templates provide you with a quick way to create the project structure for standard applications with the appropriate combination of technologies already specified. The new application created from the template appears in the Application Navigator already partitioned into tiered projects, with the associated technology scopes set in each project. [ tell me more...]
When you create your application based on the
Java Desktop Application template, JDeveloper adds a project file named
Client.jpr, so the Application Navigator should look like this: [
tell me more...]
You can quickly create a runnable application class file and, optionally, a frame class that you can lay out with UI controls. [ tell me more...]
When you use the Create Java Application dialog and the subsequent Create Frame dialog, JDeveloper adds a skeleton application file and a frame file to your project, which by default are named
tell me more...]
My Java Swing Applicationas the title for the frame. Then select Menu Bar , Status Bar , and About Box to create those items for this first frame. Then click OK.
When you create your Java application, the Application Navigator should look like this, if all nodes are expanded: [ tell me more...]
Using JDeveloper's Java visual editor, you can quickly and easily assemble the elements of a user interface (UI) for a Java application using Swing components. You construct the UI with JavaBeans (such as buttons, text areas, lists, dialogs, and menus) selected from the Component Palette. Then, you set the values of the component properties and attach event-handler code to the component events. [ tell me more...]
Click herein the text field.
The Property Inspector lets you inspect and set component properties and attach methods to component events. Changes made in the Property Inspector are reflected in the Java visual editor and source code. The Property Inspector displays the properties of the component selections you make in the Java visual editor. The components are organized by categories, and can be easily located with the Find field on the toolbar. [ tell me more...]
jButton1_actionPerformedas the name for a generated method stub to be called from the event handler.
When you insert the
actionPerformed event, a method is generated and the source editor automatically switches to source view so that you can edit it. [
tell me more...]
Features available to you in the source editor include: [ tell me more...]
The insert or replace mode for the editor is controlled by the Insert key on the keyboard. The default is insert mode. Press Insert to toggle between insert and replace mode. [ tell me more...]
If you added the code sample, the code at the bottom of the source editor should look like this: [ tell me more...]
You can compile several nodes in an application in any combination: the entire application, an entire project, or specific Java files. [ tell me more...]
You can compile by choosing either the Ma ke or Re build command from the Build or context menu, or the toolbar. [ tell me more...]
Application1.java, which contains a main method, as the default run target. Then click OK.
The Choose Default Run Target dialog displays when you run a project for which no default run target is specified in the Run/Debug/Profile settings of the Project Properties dialog. [ tell me more...]
New classes can be created and added to your project after you build the initial set of project files. [ tell me more...]
Class1as the class name if you are using the sample code. Accept the package name.
javax.swing.JDialogin the Extends field, by clicking Browse and using the Class Browser.
Frame1.javafile in the source editor. Then add code to include this new Java class file in your application.
When you create your Java class, the Application Navigator should look like this: [ tell me more...]
In addition to JDeveloper's standard Java and PL/SQL debugger facilities, JDeveloper also provides support for debugging graphical user interfaces (GUIs) specifically for AWT and Swing-based client applications and applets. [ tell me more...]
You can use the UI Debugger features which are exposed in JDeveloper via three dockable windows: the UI Tree, the UI Outline, and the Events windows. The Events window appears the first time you track events. You can toggle all three windows by choosing View Java UI Debugger Outline, Tree or Events. [ tell me more...]
When you start the UI debugger, the Log window opens and displays the debugging trace. [ tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,