With
Toolkit.getDefaultToolkit().getScreenSize()
I get the screen size.
But usually this isn’t the available size I have for my own program, because on the mac there is a menubar on top and on the bottom an iconbar. Windows also has an iconbar. So how do I get the real available space?
From Java forum:
Now you have the bounds sans platform-dependent desktop decorations. I don’t have a Mac around so I only verified that it works on WinXP/JDK6.
Note that if you auto-hide taskbar, the bounds do NOT include taskbar, which is correct.