如题,谢谢!

解决方案 »

  1.   

    frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
    JRE>=1.4可用。
      

  2.   

    public void setExtendedState(int state)
    Sets the state of this frame. The state is represented as a bitwise mask. 
    NORMAL 
    Indicates that no state bits are set. 
    ICONIFIED 
    MAXIMIZED_HORIZ 
    MAXIMIZED_VERT 
    MAXIMIZED_BOTH 
    Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT. 
    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.