View Single Post
  #2 (permalink)  
Old 01-06-2008, 04:39 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
MouseListener
Hello Joe2003.

Let your frame or window class implement the MouseListener interface. You will have to implement all the methods of the MouseListener interface. There you will see the mousePressed() and mouseReleased() methods. Add your code there. Remember that you must add the MouseListener to the button, for example:
Code:
myButton.addMouseListener(this);
Just ask if you need more detailed help.
__________________
If your ship has not come in yet then build a lighthouse.
Reply With Quote