Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Color;
import java.awt.Robot;

public class Main {
    public static void main(String[] args) throws Exception {
        Robot robot = new Robot();

        Color color = robot.getPixelColor(20, 20);

        System.out.println("Red   = " + color.getRed());
        System.out.println("Green = " + color.getGreen());
        System.out.println("Blue  = " + color.getBlue());
    }
}