「以下は同等です」というセクションに到達すると、vc.setFullScreenWindow(window)
1つのコマンドですべてを実行する方法を示そうとしていますが、これにはかなり慣れていないため、混乱しています。
それが私の主な質問ですが、GraphicsEnvironment または JFrame について注目に値することを説明できる人がいれば、私は大いに感謝します。
import java.awt.*;
import javax.swing.JFrame;
// Screens2 can use all methods that JFrame has
public class Screens2 extends JFrame{
// Video Card used for Utilizing the graphics on the computer SCREEN
private GraphicsDevice vc;
// The Constructor merely sets the default Screen graphics up
public Screens2(){
// The OS specific Graphics Envirionment
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
// Graphics Device vc = The Default();
vc = env.getDefaultScreenDevice();
}
// he DisplayMode class encapsulates the bit depth,
// height, width, and refresh rate of a GraphicsDevice.
// this method also takes in a JFrame to Display the DisplayMode
public void setFullScree(DisplayMode dm, JFrame window){
// Nothing fancy
window.setUndecorated(true);
window.setResizable(false);
// The following is equivalent =======================================================
private GraphicsDevice.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(window);
vc.setFullScreenWindow(window);
}
}