How do I set a JFrame maximized so that it won't hide the taskbar?
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
either of these don't hide the taskbar for me
frame.setExtendedState(JFrame.MAXIMIZED_BOTH); (or setExtendedState(MAXIMIZED_BOTH) if extending JFrame)
or
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize(dim.width,dim.height); (or just setSize(dim.width,dim.height)) (this way ensure there is no setLocation() in your code)
Matti Poro
Ranch Hand
Joined: Dec 03, 2005
Posts: 41
posted
0
Hmm, both ways hide the taskbar on my Windows XP.
Matti Poro
Ranch Hand
Joined: Dec 03, 2005
Posts: 41
posted
0
I solved it.
This makes it to take the whole screen. It doesn't do that if I remove the setDefaultLookAndFeelDecorated(true).