find out the color of a pixel

Hallo.I have a programm with a JPanel.In this JPanel there is a picture.I whant to find out the color at the mouseposition.If I move the mousecursor over the picture I whant to findout the color at the mouseposition.Roger
[270 byte] By [zero_ka] at [2007-9-29 1:24:25]
# 1

http://forums.java.sun.com/thread.jsp?forum=20&thread=402506&tstart=60&trange=15

the example I put on the bottom shows how you can use the x/y values of the mouse click to zero in on the correct pixel. Also, use a media tracker to make sure the image is fully loaded in before ripping it's contents.

JDunlopa at 2007-7-13 3:46:36 > top of Java-index,Other Topics,Java Game Development...