import javax.swing.*;
import java.awt.*;
class Testing
{
public void buildGUI()
{
JFrame f = new JFrame();
f.setExtendedState(JFrame.MAXIMIZED_BOTH);
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
f.setMaximizedBounds(env.getMaximumWindowBounds());
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable(){
public void run(){
new Testing().buildGUI();
}
});
}
}
> JFrame Window will cover windows toolbar.
I comment out:
//GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
//f.setMaximizedBounds(env.getMaximumWindowBounds());
And the code still worked correctly for me. I'm using JDK1.4.2 on XP. Is this a version issue or a coding problem?
commenting out the lines also works OK for me on
java 1.5.0_05 winxp pro
java 1.4.2_08 winxp pro
but I had the OP's covering of the taskbar problems on
java 1.4.0_01 win98se
no longer have access to that config, so perhaps it was an older version problem,
perhaps an OS problem?