104105106107108109110111112113114
y += e.getY() - lastY; lastX = e.getX(); lastY = e.getY(); // Redraw the canvas canvas.draw(); } public void mouseMoved(MouseEvent e) {} }); canvas.getComponent().addMouseListener(new MouseListener() {