getPixelColor

I have the following line if (Robot.getPixelColor(x,y) == Color.red) but i get the following error, non-static method getPixelColor(int,int) cannot be referenced from a static context . How do i get that line to work?
[264 byte] By [869834dogza] at [2007-11-26 12:18:32]
# 1
Create an instance of Robot and then call the method.It is an instance method.
642814zadoka at 2007-7-7 14:58:18 > top of Java-index,Archived Forums,Socket Programming...