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 other JBCL components not already on the Palette, components you created yourself, or ones you obtained from a third party. The following details explain how to install additional components and pages to the Palette, delete unused ones, and reorganize the Palette to suit your working requirements.
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 "Creating Beans with Beans Express" in the QuickStart.
The class files for components you want 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,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- 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.
- Select the class name for the component from either the Add from Archive page or the Add from Package page.
- Use the Add from Package page to select a class file from your project if you are still developing your Bean and haven't placed the classes into a .jar or .zip file yet used the Deployment Wizard.
Note: If you are using your Bean in a designer during its development, you will need to restart JBuilder if you change and recompile your Bean, or you won't see the effects of the change.
- Use the Add from Archive page to add the class from an archive file once you have deployed your Bean as a .jar or .zip file. This is also a way that your Bean customer can install your Bean from the .jar or .zip file onto the JBuilder palette.
- Click the Install button to add the component to the Palette.
- 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:
- An image provided by the Bean itself.
- A .GIF file you select from the Item Properties dialog box.
- A default image provided by JBuilder if neither of the above are provided.
To select the image for your Component Palette button,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box.
- Select the appropriate page in the Page column.
- Select the particular component in the Components column.
- Click the Properties... button to display the Item Properties dialog box.
- Do one of the following:
- Choose Use JavaBean Icon to use the image provided by the Bean for the button.
- Choose Select Image and press the Browse button to select a .GIF file to be displayed on the button.
For best results, use a 16x16 or 32x32 .GIF file.
- Click OK to close the Item Properties dialog box.
- 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,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box.
- Select the appropriate page in the Page column or the particular component in the Components column.
- Click Remove, then click OK.
Reorganizing the Component Palette
To change the order of the pages or components on the Palette,
- Choose Tools|Configure Palette from the menu, or right-click the Component Palette and choose Properties. This displays the Palette Properties dialog box.
- Select the Pages tab of the dialog box.
- Select a page in the Page column or a component in the Components column.
- Click either Move Up or Move Down to move the selected item to a new location.
- Repeat the previous step for any additional pages or components you want to move.
- Click OK when you are finished.
Components delivered on the Palette
Borland's JavaBean Component Library (JBCL) includes several hundred JavaBean components, only some of which are delivered on the Component Palette. You can customize your Palette by adding additional components from the JBCL library, custom components from third parties, or your own components. See Managing the Component Palette in this section for information on adding components and pages to the Palette.
For a list of all the components in each of the JBCL packages, and a brief description of what they do, see the overview of the classes in each of the following JBCL packages in the JBCL Reference documentation: