Mega Code Archive

 
Categories / Java Tutorial / SWT
 

To find the primary monitor, call getPrimaryMonitor

Get all the monitors attached to the device, call Display.getMonitors() import org.eclipse.swt.widgets.Display; public class MainClass {   static Display display = new Display();   public static void main(String[] args) {     System.out.println(display.getPrimaryMonitor().getClientArea());   } }