Pure Java GUI Link Text Question

prain
prain used Ask the Experts™
on
I am wondering how to do in pure Java (Not javascript etc as my application is a Desk top application and NOT brower based) if I have a jlabel, when the user hovers the label I want to show a message box and then when the mouse moves outside the boundry of the label, the message box closes. How to do this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Engineer
Commented:
Use can use Java Swing to display a Graphical User Interface (GUI).
The JLabel is a simple object that can be displayed on your application window, and it sounds like a tool tip sounds like what you are describing.

Author

Commented:
Yes I know the tooltip, but that is pretty constrained for my requirement. The message I cam planning to popup is not just text. I has several graphical components such as images etc. the message box is fairly big. So it is not possible to achieve all these in a ToolTip.
Top Expert 2016
Commented:
You would need to probably use a custom JDialog, possibly undecorated, brought up as a result of a MouseMotionListener added to the JLabel

Author

Commented:
Finally I decided to use a JWindow on mouse listners.
Top Expert 2016

Commented:
Yes, a JWindow is essentially an undecorated window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial