本文介绍了isFullScreenSupported对于监视器始终为true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出以下代码

 GraphicsDevice screen = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0];
 if (screen.isFullScreenSupported()) {
      //is it always true for monitors?
 }

screen.isFullScreenSupported()是否始终适用于监视器?

Is screen.isFullScreenSupported() always true for monitors?

推荐答案

否,可能不正确.

SecurityManager可能不允许您使用全屏控制.主要是因为人们可以轻易地伪造整个屏幕,以便从不怀疑的用户那里获取密码(您可以嘲笑银行网站).

The SecurityManager might disallow you the full screen control. Mainly because one could easily fake whole screen in order to grab a password from not-suspecting user (you could mock a bank website).

它可以是错误的:

  • 在小程序中
  • 在WebStart应用程序中
  • 在无头模式下运行

JavaDOC:

JavaDOC of GraphicsDevice.isFullScreenSupported:

这篇关于isFullScreenSupported对于监视器始终为true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 03:38