McKenzie wrote:
Second I'm not sure anyone who has posted knows how to use whatdotcolour in Java.
Well, it's my experience that if someone is given what they think is an easy way, they'll take it. But since Spartan seems to have taken care of it already, there's no harm
There's a "Robot" class in the Java standard library (starting from 1.4.2 and up) that can do this. It has a method, "getPixelColor(int x, int y)" that will return the "Color" object of the corresponding pixel. I think you need to pass a particular Graphics object in as the Screen in the constructor, or else "Robot" will take the entire screen into calculation (since the "Robot" class is meant for doing things involving controlling keyboard/mouse movements for automated demonstrations, etc).
If you can't pass in a Graphics object to the Robot, you can use a particular component's "getLocationOnScreen" method and just subtract the two values to get the co-ordinate relative to the component's top-left corner.