title: mouseMoved event seems to only be getting called once
body: <p>Trying to make a simple RPG game with a overhead camera. When I went to go implement a <strong>MouseMotionListener</strong>, which isn't the first time I used a <strong>MouseMotionListener</strong>, it appears that the <strong>mousedMoved MouseEvent</strong> only get's called once then simple doesn't seem to work anymore. I've been stuck on this for a fair bit of time and all my research leads me to dead ends.</p>
  
  <p>I do have a full game loop with a tick and render methods. But as you see in the code below, in the mouse handling class (The bottom bit of code) It returns a number which gets increased by one every time the mouse moves (In the tick method I print to the console the value of the number) and it also should print to the console the mouse x and y coordinates. When you run the program the number is equal to one and it only prints the mouse coordinates once. An example would be the console output will look something like this:</p>
  
  <pre><code>124 82
  1
  </code></pre>
  
  <p>Or if my mouse isn't hovering the JFrame when to program launches it'll look like this:</p>
  
  <pre><code>0
  </code></pre>
  
  <p>Here's my init method for my game loop:</p>
  
  <pre><code>private void init() {
      display = new Display("Operation Blood Bath: Alpha 0_5.0", 800, 600);
      game = new Game();
      Assets.init();
  }
  </code></pre>
  
  <p>Here's my display class which gets called in the init method:</p>
  
  <pre><code>public class Display {
  
  private JFrame frame;
  private Canvas canvas;
  
  public Display(String title, int width, int height) {
      frame = new JFrame(title);
      frame.setSize(width, height);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setResizable(false);
      frame.setLocationRelativeTo(null);
      frame.setVisible(true);
  
      canvas = new Canvas();
      canvas.setPreferredSize(new Dimension(width, height));
      canvas.setMaximumSize(new Dimension(width, height));
      canvas.setMinimumSize(new Dimension(width, height));
      canvas.setFocusable(false);
  
      frame.add(canvas);
      frame.addMouseMotionListener(new MouseMotionHandling());
      frame.pack();
  }
  
  public Canvas getCanvas() {
      return canvas;
  }
  
  public JFrame getFrame() {
      return frame;
  }
  
  }
  </code></pre>
  
  <p>The tick method:</p>
  
  <pre><code>private void tick() {
      game.tick();
      System.out.println(MouseMotionHandling.HELLO());
  }
  </code></pre>
  
  <p>Here's the mouse handling class which gets called in the display class:</p>
  
  <pre><code>public class MouseMotionHandling implements MouseMotionListener {
  
  private static int number = 0;
  
  @Override
  public void mouseDragged(MouseEvent arg0) {
  
  }
  
  @Override
  public void mouseMoved(MouseEvent arg0) {
      System.out.println(arg0.getX() + " " + arg0.getY());
      number++;
  }
  
  public static int HELLO () {
      return number;
  }
  
  }
  </code></pre>
  
  <p>Where am I going work here?</p>