Posted By

studioevoque on 10/17/10


Tagged

java mouse swing


Versions (?)

Detect double-click in Java Swing


 / Published in: Java
 

Don't forget the nifty event properties to detect double-click !

  1. aComponent.addMouseListener(new MouseAdapter(){
  2. public void mouseClicked(MouseEvent e){
  3. if (e.getClickCount() == 2){
  4. System.out.println(" double click" );
  5. }
  6. }
  7. } );

Report this snippet  

You need to login to post a comment.