/** * Show the popup. * @param x The x position. * @param y The y position. */ protected void showPopUp(int x, int y) { TreePath sel = tree.getPathForLocation(x, y); if(sel==null) { tree.clearSelection(); // System.out.println("show"); if(pubuilder!=null) { JPopupMenu pop = pubuilder.buildPopupMenu(); pop.show(tree, x, y); } } }