title: JTree select item on right click
body: <p>I know how to get item from selected item my left mouse button click. I can use <code>TreeSelectionListener</code>.</p>
  
  <pre><code>tree.addTreeSelectionListener(new TreeSelectionListener(){
      @Override
      public void valueChanged(TreeSelectionEvent tse) {
          DefaultMutableTreeNode node = 
                  (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
      }
  });
  </code></pre>
  
  <p>But I need to get item clicked by right mouse button. Show popup menu which is related to item which was clicked. I tried this:</p>
  
  <pre><code>private void treeClicked(java.awt.event.MouseEvent evt) {
      if(SwingUtilities.isRightMouseButton(evt)){
          this.listRightClickMenu.show(this,evt.getX(),evt.getY());
              DefaultMutableTreeNode node = 
          (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
      }
  }                            
  </code></pre>
  
  <p>But if user click on item with right button its problem. Right click doesn't select item. How to select item by event coords or how to solve this? Primary I need to get object which is clicked no select item if its possible.</p>