How would I get a box to appear when I hover over a JLabel? The box is to explain what the label is. This is just a minor detail for the user-interface functionality of a game. So when a user hovers over a label, a box appears explaining it.

Recommended Answers

All 2 Replies

If you wrote your own code you would need to listen to mouse movement and detect a hover. When detected, get the component under the mouse and display a window.

Isn't there a tooltip class to do this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.