public void editSelected() {
    Actions action = actionsTree.getSelectedItem();

    if (action != null) {
      if (action.getClass().equals(Delay.class)) {
        formUI.getDelayTab().loadAction((Delay) action);
        formUI.getformTabs().setSelectedIndex(FormUI.DELAY_TAB);
      }

      if (action.getClass().equals(MouseMove.class)) {
        formUI.getMouseMoveTab().loadAction((MouseMove) action);
        formUI.getformTabs().setSelectedIndex(FormUI.MOUSE_MOVE_TAB);
      }

      if (action.getClass().equals(MouseClick.class)) {
        formUI.getMouseClickTab().loadAction((MouseClick) action);
        formUI.getformTabs().setSelectedIndex(FormUI.MOUSE_CLICK_TAB);
      }

      if (action.getClass().equals(CheckColour.class)) {
        formUI.getCheckColourTab().loadAction((CheckColour) action);
        formUI.getformTabs().setSelectedIndex(FormUI.CHECK_COLOUR_TAB);
      }

      if (action.getClass().equals(KeyPress.class)) {
        formUI.getKeyPressTab().loadAction((KeyPress) action);
        formUI.getformTabs().setSelectedIndex(FormUI.PRESS_KEY_TAB);
      }
    }
  }