r.mouseMove((int) p.getX(), (int) p.getY());
r.mousePress(InputEvent.BUTTON1_MASK);
for (int i = 0; i < 100; i++) {
r.mouseMove((int) p.getX() + i, (int) p.getY() + i);
}
r.mouseRelease(InputEvent.BUTTON1_MASK);
t.addMouseMotionListener(new MouseMotionAdapter() {
public void mouseMoved(MouseEvent event) {
Point p = event.getPoint();
SwingUtilities.convertPointToScreen(p, t);
crtColor = r.getPixelColor(p.x, p.y);