File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Mouse Listener Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Mouse Listener Problem" Watch "Mouse Listener Problem" New topic

Mouse Listener Problem

jyothi ve
Ranch Hand

Joined: Aug 03, 2001
Posts: 51

I have JInternalFrame, within that I have Scrollable JTable and JButton.

JTable - registred with Mouse Listener
JButton - registred with action Listener

JTable -> opens new window name 'X' when user double clicks on Jtable row
Jbutton -> opens new window 'X' when user clicks the JButton.

First time when user clicks JButton, only action lisener getting fired.
2nd time when user clicks Jbutton, both action listener and Mouse Listener getting fired.
Q is why firing both listeners when I click Jbutton (it suppose to fire only Button Listener)?

Can someone help me on this?

Its urgent.

Thanks for your help in advance

Jyothi<br /> <br />Sun Certified Business Component Developer<br />Sun Certified Web Component Developer<br />Sun Certified Java Programmer<br />Oracle Certified SQL & PL-SQL Programmer
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I agree. Here's the link:
subject: Mouse Listener Problem
It's not a secret anymore!