List of usage examples for java.awt GraphicsEnvironment getDefaultScreenDevice
public abstract GraphicsDevice getDefaultScreenDevice() throws HeadlessException;
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); DisplayMode[] dmodes = gs.getDisplayModes(); for (int i = 0; i < dmodes.length; i++) { int bitDepth = dmodes[i].getBitDepth(); }// www. java2 s . com }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); DisplayMode[] dmodes = gs.getDisplayModes(); for (int i = 0; i < dmodes.length; i++) { int refreshRate = dmodes[i].getRefreshRate(); }// w w w .j a va 2 s . co m }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gs.getDefaultConfiguration(); BufferedImage bimage = gc.createCompatibleImage(100, 100, Transparency.OPAQUE); }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); DisplayMode[] dmodes = gs.getDisplayModes(); for (int i = 0; i < dmodes.length; i++) { DisplayMode dm = dmodes[i]; int bitDepth = dm.getBitDepth(); }/*from w w w. ja v a 2 s .c o m*/ }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); DisplayMode[] dmodes = gs.getDisplayModes(); for (int i = 0; i < dmodes.length; i++) { int screenWidth = dmodes[i].getWidth(); int screenHeight = dmodes[i].getHeight(); }// w w w .j ava 2s . com }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); DisplayMode[] dmodes = gs.getDisplayModes(); for (int i = 0; i < dmodes.length; i++) { DisplayMode dm = dmodes[i]; int refreshRate = dm.getRefreshRate(); System.out.println(refreshRate); }/*from ww w. ja v a 2 s. c om*/ }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gs.getDefaultConfiguration(); // Create an image that does not support transparency BufferedImage bimage = gc.createCompatibleImage(100, 100, Transparency.OPAQUE); }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); DisplayMode[] dmodes = gs.getDisplayModes(); for (int i = 0; i < dmodes.length; i++) { DisplayMode dm = dmodes[i]; int screenWidth = dm.getWidth(); System.out.println(screenWidth); }/* ww w .j a va2 s. c om*/ }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gs.getDefaultConfiguration(); // Create an image that does not support transparency BufferedImage bimage = gc.createCompatibleImage(100, 100); }
From source file:Main.java
public static void main(String[] argv) throws Exception { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); if (gs.isFullScreenSupported()) { // Full-screen mode is supported } else {/*from w ww.j a v a 2 s . c om*/ // Full-screen mode will be simulated } }