Creating a Panel

A panel is a UI container that groups components such as buttons, checkboxes, and text fields. A panel has a border and may have a title if the border selected is a TitledBorder. Typically, a panel is embedded within a dialog box or frame.

The New Panel dialog adds a new class to the opened project that extends a panel you select. It creates a default constructor, and a jbInit() method in which JDeveloper puts property setters and other initialization code used by the Java Visual Editor.

To create a panel:

  1. Open or create a project.
  2. Choose File then choose New to locate the New Panel dialog in the New Gallery.

  3. In the Categories list, expand Client Tier and select Swing/AWT.

  4. In the Items list, select Panel and click OK to launch the New Panel dialog.

  5. In the New Panel dialog, enter a name of the panel's class and package.
  6. Choose the base class from which the panel is derived.

    You can choose from any of the base classes installed with JDeveloper. If you prefer, you can search for another class that isn't from an installed package using the browse button. By default, the selection is limited to the panel container provided with the core J2SE (Java 2, Standard Edition) and Swing classes.

  7. Click OK to create the panel and its source code.

    The panel is displayed as a .java source file in the Navigator.

To view the a panel in JDeveloper:


About Containers