Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mouse Listener Problem

 
jyothi ve
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic