tell me more icon Creating an ADF Swing Empty Form

Oracle ADF Swing is a rich client technology in the Oracle Application Development Framework (Oracle ADF). Oracle ADF Swing is fully compatible with Java Swing and adds a thin layer to the client application so that standard Java components can work with the Oracle ADF data binding libraries. To enable ADF data binding in your Java client application, use the Create ADF Swing Empty Form dialog to generate a form that contains ADF-specific code.

The Create ADF Swing Empty Form dialog will generate an empty Java client frame that is enabled as a databound Business Components client form. In the dialog, the form name you enter becomes the Java class that defines the frame for holding databound user interface (UI) components in separate panels.

Create ADF Swing Empty Form

When you click OK, JDeveloper creates the empty client form with a default data panel container, navigation bar, and menu bar. JDeveloper also generates the code needed to initialize the ADF Swing form for data binding, and displays the initial client form in the Java visual editor.

Java visual editor, new empty form

Using JDeveloper's Java visual editor, you can quickly and easily assemble the elements of a graphical user interface (GUI) for a Java application using Swing components from the Component Palette. You construct the GUI with JavaBeans (such as buttons, text areas, lists, dialogs, and menus) by dragging and dropping selected components from the Component Palette. You set the values of the component properties and attach event-handler code to the component events in the Property Inspector.

The initial client form in the visual editor is empty because it contains no databound UI components. When you use the Data Controls panel to lay out the databound UI with ADF Swing components, the code that binds the UI components to ADF Business Components view objects will be added for you.

In the Structure window you will see a hierarchical view of all the components in your client form, and their relationships. Non-menu GUI items for the object appear under a node labeled UI. The dataPanel component is the container that will hold the databound UI components that you will add later. Any menu items appear under a node labeled Menu. Any non-GUI items appear under a node labeled Other.

Structure window

Selecting elements in either the Structure window or the Java visual editor changes the selection in the Property Inspector as well.

Property Inspector

In the Application Navigator you will see the files generated by JDeveloper:

Application Navigator

The generated files are:

  • DataBindings.cpx: An Oracle ADF metadata file used to connect to the business services of the Model project.
  • Form.java: Initial Java class that defines the empty frame that contains the bootstrap code for the data panel. It is the source file that you will use to lay out the user interface (page) with databound ADF Swing components. It is also the client form that you will run at the completion of the cue cards.
  • FormPageDef.xml: An Oracle ADF metadata file that defines the interaction between the UI components you add to the client form and the business service components of the Model project.
  • adfm.xml: Contains a registry for the DataBindings.cpx file. It contains the class path relative path for the .cpx file (and other ADF metadata files) in the project. When the project is built, the adfm.xml file is put in <project-root>/adfmsrc/META-INF/adfm.xml.

Copyright © 1997, 2009, Oracle. All rights reserved.

false ,,,,,,,,,,,,,,,