Java : detect triple-click without firing double-click
问题 I have a JTable in which I want to call a function when a cell is double-clicked and call another function when the cell is triple-clicked. When the cell is triple-clicked I do not want to call the double-click-function. What I have right now is (mgrdAlarm is the JTable) : mgrdAlarm.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { System.out.println("getClickCount() = " + e.getClickCount()); if (e.getClickCount()==2) { doubleClick(); System.out.println("Completed