I see many questions about how to maximize a JFrame without hiding the task bar, but in my case the question is just the opposite. I'm trying to use all of the screen including the task bar in order to have more room for my application. Why does my app not use the whole screen?
Here is what I do:
frame.setExtendedState(frame.getExtendedState() | frame.MAXIMIZED_BOTH);
frame.setVisible(true);
(I work on Mac OS X 10.7)