Task

Get the current location of the mouse cursor relative to the active window.

Please specify if the window may be externally created.




import java.awt.MouseInfo
object MousePosition extends App {
  val mouseLocation = MouseInfo.getPointerInfo.getLocation
  println (mouseLocation)
}