java.awt Code Samples
- How do I read image file?
- How do I create a beep sound?
- How do I create key press event using Robot class?
- How do I create mouse event using Robot class?
- How do I get the colour of a screen pixel?
- How do I create a screen capture using Robot class?
- How do I get my screen size?
- How do I get the location of mouse pointer?
- How do I get the available font names?
- How do I get the available font family names?
- How do I get screen's display mode information?
- How do I get number of available screens?
- How do I turn the Num Lock button on?
- How do I get mouse number of buttons?
Page 1 of 2 |
Prev
|
Next
How do I get the colour of a screen pixel?
The example here show us how to get the color of a pixel in the screen. We use the Robot.getPixelColor(int x, int y) method to obtain the Color of the pixel.