- In the default Palette group, click the Non-Palette Component node.
- Move your pointer over the form workspace. Valid drop location highlights when the placement pointer
hovers above it,
the pointer changes its shape, and the drop target is described briefly in a tooltip, as shown in the
- Click on the form workspace at the desired location to place the component.
- In the Add Non-Palette Component dialog box, click the Class or Form radio button, and specify the name of the class or form in the text field. Alternatively, click the corresponding ellipsis button, or press Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift Enter.
- If you have selected
option, locate the desired class, using Search
by Name tab, or Project tab:
If IntelliJ IDEA cannot locate the compiled class with the specified name and the default constructor, the component is red highlighted in the form, which means that it will not show at runtime:
Compile the class Ctrl+Shift+F9Ctrl+Shift+F9Ctrl+Shift+F9Ctrl+Shift+F9Ctrl+Shift+F9Ctrl+Shift+F9Ctrl+F7F9Ctrl+Shift+F9Meta Shift F9Meta Shift F9Meta Shift F9 and press Reload Custom Components button on the toolbar
- If you have selected Form option, locate the desired form, using Search by Name tab, or Project tab. The form should be bound to a class.
- Check the option Is container, if you want the new component to be able to accommodate nested components. In this case, the component will acquire certain properties that are specific for containers.
- Check the option Create binding automatically, if you want to generate a field for the component in the bound class.
- Click OK.