umm i think this is how to do it.
first set up a new robot, so
Code:
Robot (robot name here) = new Robot();
so in example
Code:
Robot myrobot = new Robot();
then you specify to get the color in the specified demension, but you need an int or something to store it in so create a new int.
then you do the rest so the whole code should look something like this
Code:
//imports go here
//class goes here {
int a;
Robot myrobot = new Robot();
public void search(){
myrobot.getPixelColor(20,20); // 20,20 is the location of the pixel on the screen.
return a;
}
}