[Your IP: 54.164.198.240]
Logowanie

Język: PL EN

KySoft Systemy Informatyczne


sitemap
Java
display-properties
lines-intersection-2D
quit-event
usefull-libs
fast file read

C/C++
build-parse-basic
tcp-send-recv
(currently only in english)
Get the size of the default screen
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
Get size of each screen
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
for (int i=0; i<gs.length; i++) {
	DisplayMode dm = gs[i].getDisplayMode();
	int screenWidth = dm.getWidth();
	int screenHeight = dm.getHeight();
}
Determine the display modes
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();
	int bitDepth = dmodes[i].getBitDepth();
	int refreshRate = dmodes[i].getRefreshRate();
}

Dodaj komentarz