Get Pixel Color on screen Java?
问题 Hello I am trying to get the color of a particular pixel on my JFrame. This is my code. My frame is red. The problem I am having is when I click the Frame it should return me the RGB color for red that is (255,0,0) but when I click at different points i sometimes get the RGB color for white (255,255,255) what is the problem in my code guys? public class guiTest extends JFrame { private static Shape ellipse; private static Robot rb; public guiTest() { super("4-connected approach"); setLayout