×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Massimo Zappino
Added: Jan 3, 2016 9:01 PM
Modified: Aug 27, 2017 3:33 PM
Views: 22
How to detect double click in mouseAdapter
  1.       component.addMouseListener(new MouseAdapter() {
  2.             public void mouseClicked(MouseEvent e) {
  3.                 if (e.getClickCount() == 2 && !e.isConsumed()) {
  4.                     e.consume();
  5.                     otherAction();
  6.                 }
  7.             }
  8.         });