Skip to content

Instantly share code, notes, and snippets.

@eirikbakke
Last active October 4, 2018 19:22
Show Gist options
  • Save eirikbakke/b85b67dae62993e3cbee51e4c9e6c214 to your computer and use it in GitHub Desktop.
Save eirikbakke/b85b67dae62993e3cbee51e4c9e6c214 to your computer and use it in GitHub Desktop.
package com.eirikbakke.upstream.popup;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
public class PrintGC {
public static final void main(String args[]) {
System.out.println(System.getProperty("java.version"));
for (GraphicsDevice graphicsDevice :
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices())
{
final GraphicsConfiguration gc = graphicsDevice.getDefaultConfiguration();
System.out.println(gc.getBounds() + " / " + gc.getDefaultTransform());
}
}
}
@Chris2011
Copy link

Chris2011 commented Oct 4, 2018

Output for me is:

run:
10.0.2
java.awt.Rectangle[x=0,y=0,width=1500,height=1000] / AffineTransform[[2.0, 0.0, 0.0], [0.0, 2.0, 0.0]]
BUILD SUCCESSFUL (total time: 1 second)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment