I would like to get the effective screen size. That is: the size of the screen without the taskbar (or the equivalent on Linux/Mac).
I am currently using...
Here is the code I ended up using:
GraphicsConfiguration gc = // ...
Rectangle bounds = gc.getBounds();
Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
Rectangle effectiveScreenArea = new Rectangle();
effectiveScreenArea.x = bounds.x + screenInsets.left;
effectiveScreenArea.y = bounds.y + screenInsets.top;
effectiveScreenArea.height = bounds.height - screenInsets.top - screenInsets.bottom;
effectiveScreenArea.width = bounds.width - screenInsets.left - screenInsets.right;