How to set full Screen Mode of My App which is made in netbeans platform?

前端 未结 7 1854
时光说笑
时光说笑 2020-12-21 16:54

I m made Desktop App in netbeans platform in java.now wwhen i run my app it will open by default size of netbeans platform configuration.but i want full screen mode when i r

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-21 17:32

    If you want you Application to be Full Screen..Use Toolkit...

    Toolkit t = Toolkit.getDefaultToolkit();
    
    Dimension d = t.getScreenSize();
    
    int ScreenWidth = d.width;
    
    int ScreenHeight = d.height;
    
    myframe.setSize(ScreenWidth, ScreenHeight);
    
    myframe.setLocationByPlatform(true);
    

提交回复
热议问题