@Override public void popupMenuCanceled(PopupMenuEvent e) {
        AWTEvent ev = EventQueue.getCurrentEvent();
        if (ev instanceof MouseEvent) {
            cancelReason = ev.getSource();
        }
    }
@Override public void popupMenuCanceled(PopupMenuEvent e)