MenuSelectionManager msm = MenuSelectionManager.defaultManager(); MenuElement[] oldSelection = msm.getSelectedPath(); for (int i = 0; i < oldSelection.length; i++) { if (oldSelection[i] == JMenu.this) {   MenuElement[] newSel = new MenuElement[i]; System.arraycopy(oldSelection, 0, newSel, 0, i); msm.setSelectedPath(newSel); break; } }
    public void clearAccessibleSelection()      throws NotImplementedException    {      // TODO: Implement this properly.    }