Adding a Component to a Form

See Also

Once you have created a new form, you can add components which provide the desired display information and control functionality. In the IDE, you can add components several ways, including:

To add a component from the Palette:

  1. Select a component in the Palette window by clicking its icon. Without releasing the mouse button, drag the component to the desired location in the form.
  2. If you want to add the component to the Other Components node, drag the component to the white area outside the form in the GUI Editor's workspace.

    The IDE adds the component to the selected container in the form.

To add multiple components from the Palette:

  1. Select the component you want to add in the Palette window by clicking its icon.
  2. While holding down the Shift key, click the location in the form where you want to place the first component.
  3. Click each additional location in the form that you want to place an instance of the component you selected in the Palette.
  4. If you want to add the component to the Other Components node, click in the white area outside the form in the GUI Editor's workspace.

    The IDE adds the components to the selected container in the form.

To add a component using the Inspector window:

  1. In the Inspector window, right-click the container to which you want to add a component.
  2. Choose the desired component from the Add From Palette submenu.

    The IDE adds the component to the selected container in the form.

To add a bean from the Projects, Files, or Favorites windows:

  1. In the Files window, locate the bean's class node. The class must be a bean and it must be compiled. Note that for a class to be a bean, it must be possible to create an instance of the class using an empty public constructor.
  2. Right-click the class node and choose Copy from the contextual menu.
  3. Choose Paste from the contextual menu of either the GUI Builder or the Other Components node in the Inspector window.

    The IDE adds the bean to the current form.

See Also
Selecting Components in a Form
Editing Component Properties
Designing Java GUIs with the GUI Builder
Adding a Bean to the Palette Window

Legal Notices