// called when the user clicks last_x = x; last_y = y; return true;
Graphics g = getGraphics(); g.drawLine(last_x, last_y, x, y); last_x = x; last_y = y; return true;