예제 #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());
 }
예제 #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