void (Component comp, int x, int y) { final TreeTableTree tree = myTreeTable.getTree(); final int[] selectionRows = tree.getSelectionRows(); if (selectionRows != null && tree.getPathForLocation(x, y) != null && Arrays.binarySearch(selectionRows, tree.getRowForLocation(x, y)) > -1) { compoundPopup().show(comp, x, y); } }