identifying double click in java
Assuming you mean in Swing, assign a MouseListener to your Component:
addMouseListener(new MouseAdapter(){
@Override
public void mouseClicked(MouseEvent e){
if(e.getClickCount()==2){
// your code here
}
}
});
Reference:
- Java Tutorial: How to write a Mouse Listener
public void mouseClicked(MouseEvent event)
{
if (event.getClickCount() == 2 && event.getButton() == MouseEvent.BUTTON1) {
System.out.println("double clicked");
}
}