equal
deleted
inserted
replaced
198 protected native int getDefaultScreenNum(); |
198 protected native int getDefaultScreenNum(); |
199 /** |
199 /** |
200 * Returns the default screen graphics device. |
200 * Returns the default screen graphics device. |
201 */ |
201 */ |
202 public GraphicsDevice getDefaultScreenDevice() { |
202 public GraphicsDevice getDefaultScreenDevice() { |
203 return getScreenDevices()[getDefaultScreenNum()]; |
203 GraphicsDevice[] screens = getScreenDevices(); |
|
204 if (screens.length == 0) { |
|
205 throw new AWTError("no screen devices"); |
|
206 } |
|
207 int index = getDefaultScreenNum(); |
|
208 return screens[0 < index && index < screens.length ? index : 0]; |
204 } |
209 } |
205 |
210 |
206 public boolean isDisplayLocal() { |
211 public boolean isDisplayLocal() { |
207 if (isDisplayLocal == null) { |
212 if (isDisplayLocal == null) { |
208 SunToolkit.awtLock(); |
213 SunToolkit.awtLock(); |