Results 1 to 3 of 3
Thread: JButton onClick?
- 01-06-2008, 11:57 AM #1
Member
- Join Date
- Jan 2008
- Posts
- 21
- Rep Power
- 0
- 01-06-2008, 02:39 PM #2
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:
Just ask if you need more detailed help. ;)Java Code:myButton.addMouseListener(this);
Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 01-06-2008, 03:04 PM #3
Member
- Join Date
- Jan 2008
- Posts
- 21
- Rep Power
- 0
Similar Threads
-
use of onclick function
By m4tt in forum New To JavaReplies: 1Last Post: 02-16-2008, 03:03 AM -
Help with JButton and layout
By adlb1300 in forum AWT / SwingReplies: 1Last Post: 12-25-2007, 08:33 AM -
How to change TXT color Onclick
By dave700800 in forum New To JavaReplies: 1Last Post: 12-08-2007, 01:39 AM -
Need help with JButton event
By adlb1300 in forum New To JavaReplies: 2Last Post: 11-19-2007, 01:15 AM -
Mouse over JButton
By sandor in forum AWT / SwingReplies: 1Last Post: 05-17-2007, 09:15 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks