Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Can't detect double-click mouse events in Mustang

Reply
Thread Tools

Can't detect double-click mouse events in Mustang

 
 
Wes Harrison
Guest
Posts: n/a
 
      06-29-2006
The following relates to Mustang b89 on Windows Server 2003. It may well
relate to earlier Java versions as well but I haven't tested it.

I think my understanding of mouse clicked events is wrong because I don't
get the behaviour I expect. When I implement the following code:

table.getTableHeader().addMouseListener(new MouseAdapter()
{
public void mouseClicked(MouseEvent event)
{
System.out.println("Mouse event, clickCount = " +
event.getClickCount());
}
}

I get the following output for every double-click:

Mouse event, clickCount = 1
Mouse event, clickCount = 2

Shouldn't it be just one event with a clickCount of 2? How can I tell the
difference between the first event and a normal single-click?

Thanks,

Wes


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JDWP JNI AGENT_ERROR_NO_JNI_ENV Mustang spamBucket@agile-it.com Java 0 07-24-2006 06:29 PM
Using JTabbedPane from Mustang with 1.5 JRE bruces1@gmail.com Java 4 04-24-2006 09:03 AM
Using the Desktop API in Java SE 6 (Mustang) John O'Conner Java 1 02-08-2006 06:43 AM
Java Mustang - new type verifer Yamin Java 1 11-30-2005 12:22 AM
Ford Mustang turns 40 Boomer Computer Support 1 04-18-2004 05:16 AM



Advertisments