Duplicate :
|
|
Relates :
|
|
Relates :
|
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)); } } }
|