Java GraphicsEnvironment .getScreenDevices ()
Syntax
GraphicsEnvironment.getScreenDevices() has the following syntax.
public abstract GraphicsDevice [] getScreenDevices() throws HeadlessException
Example
In the following code shows how to use GraphicsEnvironment.getScreenDevices() method.
//from w w w .j ava2 s . c om
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
public class Main {
public static void main(String[] args) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] defaultScreens = ge.getScreenDevices();
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »