# Modifying Components in the Grid

This section explains how to:

- Copy a component to another cell
- Delete a component
- Change a component's attributes

To copy a component to another cell:

1. Select the component.
2. Choose GUI -> Copy Component.
3. Click in the cell in which you want to paste a copy of the component.
4. Choose GUI -> Paste Component.

A shortcut to copying and pasting components is to select the component then while holding the Control key down, click in the grid cells where you want to place the component.

To delete a component:

1. Select the component.
2. Choose GUI -> Delete Component.

You can also choose GUI -> Cut Component to remove the component and place it on the clipboard. Click on a cell and choose GUI -> Paste Component to paste the component into the selected cell.

To change a component's attributes:

1. Open the attribute editor by selecting a component in the gridbag and clicking on its button in the main toolbar.
   A shortcut method for opening the attribute editor is to double-click while the cursor is positioned in the area between the component and its cell border.
2. Changes the values for the attributes you want to modify.
3. Click OK to establish the changes.

Component attributes vary, depending on the function of the component. Not all characteristics of a component can be modified. The attribute editor displays only those aspects of a component that you can change. Specialized attributes are explained with the description of their associated components; for a list of the palette components, see GUI Builder Palette. General attributes that apply to most of the components are described in Attribute Editor.

For more details about component attributes, see the API documentation.

To customize a bean:

1. Select a bean that you've placed in the gridbag.
2. Open the attribute editor by clicking on its button in the main toolbar.
3. Click the Customizer button to open the Customizer dialog box.
4. Set the attributes you want to change (attributes displayed in the dialog box are specific for the actual bean).
5. Click OK to close the dialog box, then click OK in the attribute editor to establish the changes.

You can modify a bean if the bean contains a customizer in its JAR file. No action results if you click the Customizer button for a bean without a customizer in its JAR file.

See also:

  Generating Java Source Code
  Adding a Menu Bar and Menus
  Adding Behavior to Components
  Adding Custom Components and Windows
  GUI Builder Palette

  Visual Java GUI Builder API Documentation
    Visual Java GUI Builder Runtime Packages
    Class Hierarchy
    Index of All Fields and Methods