title: Getting mouse coordinates every time mouse moves
body: <p>So i have this code, however i dont get it how to set the mouse coordinates to the label every time the mouse moves ... </p>
  
  <pre><code>timer.schedule(new TimerTask() {
  
      @Override
      public void run() {
          int mouseX = MouseInfo.getPointerInfo().getLocation().x;
          int mouseY = MouseInfo.getPointerInfo().getLocation().y;
          lblInfo.setText("Nada "+mouseX+mouseY);
      }
  
  }, 1);
  </code></pre>
  
  <p>Im not even sure if the code is right but what i want it to do is to get the mouse coordinates in the label called lblInfo every time the mouse moves.</p>
  
  <p>This code what does is only display it once whenever the program starts... </p>