-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 5.0
-
b04
-
x86
-
linux
-
Not verified
The following test prints the insets for all screens on the system. On RedHat 7.2 running GNOME/sawfish, getScreenInsets() does not recognize the GNOME taskbar - the insets are always 0,0,0,0. I tried 1.4, 1.4.1b19 and 1.4.2b01.
// Print insets for all screens
import java.awt.*;
public class ScreenInsets {
public static void main(String[] args) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gds = ge.getScreenDevices();
for (int i = 0; i < gds.length; i++) {
GraphicsConfiguration gc = gds[i].getDefaultConfiguration();
System.out.println(gc + ", insets: " + Toolkit.getDefaultToolkit().getScreenInsets(gc));
}
}
}
// Print insets for all screens
import java.awt.*;
public class ScreenInsets {
public static void main(String[] args) {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gds = ge.getScreenDevices();
for (int i = 0; i < gds.length; i++) {
GraphicsConfiguration gc = gds[i].getDefaultConfiguration();
System.out.println(gc + ", insets: " + Toolkit.getDefaultToolkit().getScreenInsets(gc));
}
}
}
- duplicates
-
JDK-6357489 GraphicsEnvironment.getMaximumWindowBounds() does not work correctly on Linux
-
- Closed
-
- relates to
-
JDK-6499736 NPE is thrown from XToolkit.getScreenInsets() if no window manager is present
-
- Closed
-
-
JDK-8170937 Swing apps are slow if displaying from a remote source to many local displays
-
- Resolved
-