When launching the simplest window, for some reason the mouseMoved event is not fired, although next to exactly the same condition, exactly the same mousePressed and everything is output.
class MainWindow extends JFrame { public MainWindow() { setSize(300, 300); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); addMouseListener(new MouseAdapter() { @Override public void mouseMoved(MouseEvent e) { int x = e.getX(); int y = e.getY(); System.out.println("Coords moved: X- " + x + ", Y - " + y); } @Override public void mousePressed(MouseEvent e) { int x = e.getX(); int y = e.getY(); System.out.println("Coords: X- " + x + ", Y - " + y); } }); } }