Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize(dim.width, (dim.height - 25));25为windows屏幕上工具栏的高度
原因可能是这样的: setExtendedState(int state) Note that if the state is not supported on a given platform, nothing will happen. The application may determine if a specific state is available via the java.awt.Toolkit#isFrameStateSupported(int state) method.
frame.setSize(dim.width, (dim.height - 25));25为windows屏幕上工具栏的高度
setExtendedState(int state)
Note that if the state is not supported on a given platform, nothing will happen. The application may determine if a specific state is available via the java.awt.Toolkit#isFrameStateSupported(int state) method.