aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable events and listeners - prevent multiple executions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable events and listeners - prevent multiple executions" Watch "JTable events and listeners - prevent multiple executions" New topic
Author

JTable events and listeners - prevent multiple executions

olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
Hi,

following problem:
i have a jtable which listens for events and when an event occurs, all listeners get a message.

the problem is, that this action gets executed often more than once when doubleclicking in an element in the jtable.
Is there any way to prevent this? eg. "if the user double clicked, drop all other events and only notice this one" ?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

Is there any way to prevent this? eg. "if the user double clicked, drop all other events and only notice this one" ?

Maybe something like the approach I suggested in
http://www.coderanch.com/t/529247/GUI/java/JFace-Tableviewer


luck, db
There are no new questions, but there may be new answers.
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
thanks
i used the search but... somehow... didnt find that posting
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

Huh? the link doesn't work for you?
olze oli
Ranch Hand

Joined: Jun 20, 2009
Posts: 148
the link worked for me and solved my problem. But before i posted, i used the search too and didnt find that link.

edit: my english is not the best ;)
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

Ah, ok Kudos to you for trying the search!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTable events and listeners - prevent multiple executions