Is there an error in this Java book? or am I missing something? (DisplayMode)

前端 未结 1 1034
时光取名叫无心
时光取名叫无心 2021-01-25 04:26

The following code is written the exact same way as in a Java book I am reading

package main;

 import java.awt.Color;
 import java.awt.DisplayMode;
 import java         


        
相关标签:
1条回答
  • 2021-01-25 05:19

    DisplayMode has to do with Java "Full Screen Exclusive Mode" functions, which are documented here:

    • http://docs.oracle.com/javase/tutorial/extra/fullscreen/displaymode.html

    • http://docs.oracle.com/javase/7/docs/api/java/awt/DisplayMode.html

    I would encourage you to try some of the sample programs here:

    • http://docs.oracle.com/javase/tutorial/extra/fullscreen/example.html

    The bottom line is:

    1) not all OS's or display devices are necessarily supported by this API

    2) All combinations of arbitrary DisplayMode settings aren't necessarily supported if the device itself doesn't support them

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