Managing the Component Palette

To use a class as a UI component in JBuilder's designers, it must be installed on the Component Palette. JBuilder comes with several sets of components already installed on the Component Palette. These components are grouped onto different pages. You can add components to the existing pages, or create new pages for them.

You may wish to install new components onto the Component Palette. These might be components you created yourself, or ones you obtained from a third party. Third party components will probably have their own installation programs. The following details explain how to install your own components to the Palette.

Adding a component to the Palette

If your component is a JavaBean, you can place it onto the Component Palette. For more information on creating components and JavaBeans, see the Component Writers Guide , and Beans Express.

The class files for components you wish to install must be placed in one of the directories named in your classpath. If the component is part of a package, then the class files must be placed in the appropriate subdirectory of any directory in your classpath.

For example, if you have a component named ExampleComponent that is in a package called xxx.yyy (so its full name is xxx.yyy.ExampleComponent), then place the ExampleComponent.class file in an xxx/yyy subdirectory of one of the classpath directories.

To place the component onto the Component Palette,

  1. Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
  2. Select the Pages tab of the dialog box. In the Pages column, select the Palette page on which you want your component to appear, or click the Add... button to create a new page.
  3. Select the class name for the component from either the Add from Archive page or the Add from Package page.
  4. Click the Install button to add the component to the Palette.
  5. When you see the message "Installation complete, then click OK to close the Palette Properties dialog box.

Selecting an image for a Component Palette button

The image on a Component Palette button can be one of three things: To select the image for your Component Palette button,
  1. Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
  2. Select the Pages tab of the dialog box.
  3. Select the appropriate page in the Page column.
  4. Select the particular component in the Components column.
  5. Click the Properties... button to display the Item Properties dialog box.
  6. Do one of the following:
  7. Click OK to close the Item Properties dialog box.
  8. Click OK on the Palette Properties dialog box when you're finished.

Removing a page or component from the Palette

To remove a page or component from the Palette,
  1. Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
  2. Select the Pages tab of the dialog box.
  3. Select the appropriate page in the Page column or the particular component in the Components column.
  4. Click Remove, then click OK.

Reorganizing the Component Palette

To change the order of the pages or components on the Palette,
  1. Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
  2. Select the Pages tab of the dialog box.
  3. Select a page in the Page column or a component in the Components column.
  4. Click either Move Up or Move Down to move the selected item to a new location.
  5. Repeat the previous step for any additional pages or components you want to move.
  6. Click OK when you are finished.


Components delivered on the Palette

Visual controls

Borland Controls AWT Controls Windows equivalent Description
   
Button Push button Simple push button
ButtonControl
   
   
Graphical data aware push button
ButtonBar
   
   
Toolbar
CheckBoxControl Checkbox Check box, Radio button On/off, true/false selection
   
Label Static control Uneditable text display
LabelControl
   
   
Data aware label
   
TextField Edit box Single line text input and editing
TextFieldControl
   
   
Data aware text field
FieldControl
   
   
Data type controlled input and editing
ImageControl
   
   
Image display, optionally data aware
   
List List box List of text items
ListControl
   
   
Data aware list
ChoiceControl Choice Combo box Drop-down selection list
   
ScrollBar Scroll bar Scrolling and range positioning
ScrollBarControl
   
   
Data aware ScrollBar
NavigatorControl
   
   
Database navigation
LocatorControl
   
   
DataSet record selection
TreeControl
   
   
Outline or tree display
TabsetControl
   
   
Set of tabs
GridControl
   
   
Data aware spreadsheet
StatusBar
   
   
Data aware status bar
TextAreaControl
   
   
Multi-line, scrollable text entry area with model-view functionality
   
ScrollPane
   
Allows scrolling for one child component
ShapeControl
   
   
Allows you to place shape objects in your design

Containers

Borland Containers AWT Containers Windows equivalent Description
 
Panel Borderless child window UI container, defaults to parent's color and FlowLayout, borderless
BevelPanel
 
Child window UI container, defaults to gray and XYLayout, border with bevelled edge options
GroupBox
 
 
UI container with borders and a label at the top that groups other components
SplitPanel
 
 
UI Container with multiple panes
TabsetPanel
 
Tabbed child window Composite control with tabs at top or bottom, client area
CheckBoxPanel
 
 
BevelPanel with multiple check boxes which can be grouped

Menus

AWT MenusWindows equivalentDescription
MenuBarMenu barMenu bar anchored to top of Frame
PopupMenuPopup menuFloating menu

Dialogs

Borland Dialogs Windows equivalentDescription
FilerCommon File dialogOpening and saving files
ColorChooser
 
Selecting a color
FontChooser
 
Setting font parameters
MessageMessageBoxDisplaying a message

Data Access

Borland DatasetWindows equivalentDescription
Database
 
JDBC connection to a SQL database
QueryDataSet
 
Data obtained from a SQL query
ProcedureDataSet
 
Data obtained from a SQL stored procedure
TableDataSet
 
Data obtained from a file
DataSetView
 
Alternate view of data
TextDataFile
 
Properties used to import data from a text file
QueryResolver
 
Saves changes to data using a query