I have a JComponent that's painting various shapes on itself. I'm detecting whenever the mouse enters one of these shapes and changing the tooltip accordingly.
The problems I'm having are:
- The tooltip doesn't follow the mouse as the user tracks the mouse across the shape. It
stays where it was first set and then only jumps whenever another shape changes the tooltip.
- It takes about a second for the tooltip to appear, but I'd like it to appear immediately.
Can someone suggest a way of getting these behaviours without writing a custom tooltip mechanism?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…