Adding Custom Components and Windows
You can add your own custom windows and components to the layout
(without having to add them to a palette):
- Generic Component. Creates a particular type
of component when you specify a component class in the attribute
editor and set its attributes.
- Generic Window. Creates a top-level
window when you specify a frame or dialog class in the attribute
editor and set its attributes.
To add a custom component
with Generic Component:
- Click on Generic Component in the Additional palette.
- Click in the cell where you want to place the component.
- Open the attribute editor by clicking on its button in the main
toolbar.
- Use the
class
attribute to specify your
custom component by its full package and class name. By
default, the class
attribute of Generic
Component contains java.awt.Button
, the
standard AWT button object.
The component must have a null constructor, and it must be a subclass
of java.awt.Component
.
- Enter a unique component ID in the name box.
Using Generic Component does not integrate your component into the GUI
builder component palette.
To add a custom window to
the layout:
- Choose GUI -> Add New Window to open the New Window
dialog box.
- Choose Generic Window from the list.
- Click Create.
- Select Generic Window in the mode list (next
to the component palette) to open the attribute editor.
- Use the
class
attribute to specify your
custom window by its full package and class name.
By default, the Generic Window class
attribute
contains sunsoft.jws.visual.rt.awt.RootFrame
.
Your custom window must be a subclass of
sunsoft.jws.visual.rt.awt.RootFrame
or
sunsoft.jws.visual.rt.awt.RootDialog
See Defining Attributes for
information on defining attributes for custom shadows or groups.
See also:
- Importing Components
- Generating Java Source Code
- Adding Operations to Components
- What Is a Component Operation?
- GUI Builder Runtime Classes
- GUI Builder Palette
- Visual Java GUI Builder API Documentation
- Visual Java GUI Builder
Runtime Packages
- Class Hierarchy
- Index of
All Fields and Methods