Java tutorial
import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Robot; public class Main { public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] gs = ge.getScreenDevices(); for (int i = 0; i < gs.length; i++) { Robot robot = new Robot(gs[i]); } } }