Q:

Java - Obtain Intensity Value of Particular Pixel Through MouseListener

Could someone tell me the class I would need to use in order to obtain the pixel intensity of one specific pixel (a pixel the user clicks) in an image, say, in some JPanel?  This will be a grayscale image if that makes a difference.  Put another way, say the user clicks on some point (x, y) in an image.  How can I get the intensity value of this point (x, y)?
Thank you!

A:

Robot can do this for color
Use the method
getPixelColor(int x, int y)

See this question for tips on converting colour to grayscale 

