Exemplo n.º 1
0
 public void showPopupMenu(java.awt.event.MouseEvent evt) {
   int r = m_table.rowAtPoint(new Point(evt.getX(), evt.getY()));
   if (r != -1) {
     m_table.setRowSelectionInterval(r, r);
   }
   m_popupMenu.show(this, evt.getX(), evt.getY());
 }
Exemplo n.º 2
0
 private void tableMousePressed(java.awt.event.MouseEvent evt) // GEN-FIRST:event_tableMousePressed
     { // GEN-HEADEREND:event_tableMousePressed
   System.out.println("pressed !");
   // Add your handling code here:
   if (evt.isPopupTrigger()) {
     System.out.println("trigger !");
     showPopupMenu(evt);
   }
 } // GEN-LAST:event_tableMousePressed