jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java
Print this page
*** 91,101 ****
protected native int getNumScreens();
protected native int getDefaultScreen();
public GraphicsDevice getDefaultScreenDevice() {
! return getScreenDevices()[getDefaultScreen()];
}
/**
* Returns the number of pixels per logical inch along the screen width.
* In a system with multiple display monitors, this value is the same for
--- 91,103 ----
protected native int getNumScreens();
protected native int getDefaultScreen();
public GraphicsDevice getDefaultScreenDevice() {
! GraphicsDevice[] screens = getScreenDevices();
! int index = getDefaultScreen();
! return screens[screens.length <= index ? 0 : index];
}
/**
* Returns the number of pixels per logical inch along the screen width.
* In a system with multiple display monitors, this value is the same for