8

In some situations I need to place a JFrame right where the mouse cursor is located. Do I really need a mouse listener to track mouse move events, or I can just read current mouse position somehow?

milan
  • 2,355
  • 2
  • 23
  • 38

1 Answers1

13

this could help:

MouseInfo.getPointerInfo().getLocation()

oliholz
  • 7,447
  • 2
  • 43
  • 82