Setting fullscreen using other ways besides getting screen size in Java

后端 未结 1 954
既然无缘
既然无缘 2021-01-26 09:05

I was wondering if there was a way that is better than using the Toolkit.getDefaultToolkit().getScreenSize().getHeight()/getWidth(); and then using that as the dime

相关标签:
1条回答
  • 2021-01-26 09:36

    You're after what's called "full-screen exclusive mode"

    Have a look at Full-Screen Exclusive Mode for more details.

    Understand though, it doesn't play well with Swing.

    Under Mac OS X 10.7, you can access the full screen support it provides for applications using com.apple.eawt.Application.requestToggleFullScreen(Window).

    Take a look at Fullscreen feature for Java Apps on OSX Lion for more details

    0 讨论(0)
提交回复
热议问题