@Override
    public void dragDropEnd(DragSourceDropEvent event) {
      Component component = event.getDragSourceContext().getComponent();
      if (!event.getDropSuccess() &&
          component instanceof PaletteComponentList &&
          getRootPane() == ((JComponent)component).getRootPane()) {
        clearActiveItem();
      }
    }
@Override
    public void dragDropEnd(DragSourceDropEvent event)