jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
Print this page
*** 198,208 ****
protected native int getDefaultScreenNum();
/**
* Returns the default screen graphics device.
*/
public GraphicsDevice getDefaultScreenDevice() {
! return getScreenDevices()[getDefaultScreenNum()];
}
public boolean isDisplayLocal() {
if (isDisplayLocal == null) {
SunToolkit.awtLock();
--- 198,210 ----
protected native int getDefaultScreenNum();
/**
* Returns the default screen graphics device.
*/
public GraphicsDevice getDefaultScreenDevice() {
! GraphicsDevice[] screens = getScreenDevices();
! int index = getDefaultScreenNum();
! return screens[0 < index && index < screens.length ? index : 0];
}
public boolean isDisplayLocal() {
if (isDisplayLocal == null) {
SunToolkit.awtLock();