void (DragSourceDropEvent event) { Component component = event.getDragSourceContext().getComponent(); if (!event.getDropSuccess() && component instanceof PaletteItemsComponent && myDesigner != null && myDesigner.getRootPane() == ((JComponent)component).getRootPane()) { myDesigner.getToolProvider().loadDefaultTool(); } }