0

I am relatively new to the Java Swing library and I am attempting to write a program that detects a mouse hover event and shows a popup. I am using the mouseEntered event, however it is only being triggered when the mouse enters from outside the entire frame, as opposed to hovering over different components within the frame. Is there anyway I can fix this?

Ushal Naidoo
  • 2,704
  • 1
  • 24
  • 37
  • Are you adding your mouse event listener object to the entire frame? I think you should be able to add it to your component within the frame, if I'm not mistaken. – Gregory Desrosiers May 17 '15 at 15:04
  • 2
    Have you seen this: http://stackoverflow.com/questions/5957241/text-mouseover-popups-over-a-swing-jtextarea – Bobulous May 17 '15 at 15:06
  • Just use the [tool tips](https://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html) as that's exactly what it's for. – Hovercraft Full Of Eels May 17 '15 at 15:18

1 Answers1

0

The mouse over triggers when the mouse pointer enters to a controller from another location. I think you will get the thing done with MouseMoved event of the controller.

Sanke
  • 676
  • 2
  • 13
  • 30