my dog learned polymorphism
The moose likes Swing / AWT / SWT and the fly likes About button's onMouseOver event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "About button Watch "About button New topic

About button's onMouseOver event

rose deng
Ranch Hand

Joined: Dec 29, 2000
Posts: 78
I want to do following thing: when put mouse over button,some hint message will appear,when mouse left,the message disappear.
i know it's easy to do if use javascript,but i want to do it use java in applet.
Give me help and thanks for your help a lot.
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Hi Rose!
If you are using Swing, you can accomplish this by using the setToolTipText(String tip) for your button.
Hope this helps.
It is sorta covered in the JavaRanch Style Guide.
subject: About button's onMouseOver event
jQuery in Action, 3rd edition