Java Swing question.
I have a JPanel
which displays a graph. When I move the mouse over this graph, I want certain information to be displayed on a tooltip-like widget that moves with the mouse. How can I best implement this?
I guess my problem will be solved if I know how to position a custom JComponent
absolutely within the JPanel
that acts as my drawing canvas. I could then trap the mouse moved event and reposition/update the widget. Any other solution (including possibly using JToolTip
directly) would also be very much welcome!