IntelliJ IDEA 13.1 Web Help

GUI Designer enables you to create listeners for components. The components that have listeners, are marked with a special icon img that shows up when such component is selected. From the components in the Form Workspace and in the Components tree view, you can quickly navigate to the respective source code.

To create a listener
  1. Select component in the Form Workspace, or in the Components tree view.
  2. On the context menu, choose Create Listener, or press Ctrl+OCtrl+OCtrl+OCtrl+OCtrl+OCtrl+MCtrl+Shift+OCtrl+OCtrl+OControl OCommand OControl O.
  3. From the Create Listener pop-up menu, select the desired listener type.
  4. In the Select Method to Override dialog box, select the desired method. Optionally, specify whether you want the JavaDoc comment for this method to be copied to the target file, and press OK. The stub method that overrides the specified method, is added to the bound class.
  5. If you would like modify the body of the stub method, edit the Overridden Method Body file template:

    In the File Templates dialog, open the Code tab, and edit the template as required.

To navigate from a component to listener
  1. Select component in the Form Workspace, or in the Components tree view.
  2. On the context menu, choose Go to Listener.
  3. In the Navigate to Listener pop-up menu, click the desired listener, or press Ctrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+T or Ctrl+Alt+BAlt Command B or Alt Command Button1 ClickAlt Command B or Alt Command Button1 ClickAlt Command B or Alt Command Button1 Click.

Tip

In the Form Workspace, click img and select the desired listener.

Screenshot

See Also

Reference:

Web Resources: