Here you can find the source of getDefaultGraphicsConfiguration()
private static GraphicsConfiguration getDefaultGraphicsConfiguration()
//package com.java2s; import java.awt.*; public class Main { /** Tells wether this WM may support acceleration of some images */ private static boolean VM_SUPPORTS_ACCELERATION = true; private static GraphicsConfiguration getDefaultGraphicsConfiguration() { try {/*from w ww .j av a 2 s .c o m*/ GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); if (!env.isHeadlessInstance()) { return env.getDefaultScreenDevice().getDefaultConfiguration(); } } catch (LinkageError e) { // Means we are not in a 1.4+ VM, so skip testing for headless again VM_SUPPORTS_ACCELERATION = false; } return null; } }