IntelliJ IDEA 2024.1 Help

Adding GUI Components and Forms to the Palette

Adding new elements to the Palette enables you to reuse components from the libraries, or already created GUI forms that exist in your project.

For visual identification of the new components, you can use icons. Icons shouldn't be larger than 18 x 18 pixels. If no icon is provided for a component, the Palette will default to the icon of the ancestor class if the component is derived from a Java UI class, or a default icon.

To add a new component to the Palette

  1. Right-click the target group, and choose Add Component to Palette. The Add Component dialog opens.

  2. Click Class radio-button to add a component from a class library, or Form to add an existing GUI form.

  3. Specify the fully qualified name of the component class or form, or click the ellipsis button next to the selected field, and select the desired component class or form file in the Choose Component Class or Choose Form File dialog respectively.

  4. Optionally specify an icon for the component. Enter the fully qualified name of the icon file, or click Browse next to the Icon field, and select the desired icon in the Choose Icon File dialog.

  5. In the Horizontal / Vertical size policies section, define how the component should behave when its parent container is being resized.

  6. Set the options Is container, Create binding automatically, and Can have attached label.

  7. Click OK to add the component to the target group.

Last modified: 26 May 2024