Mit welchen Befehlen kann man:
a) die Java - Anwendung auf Fullscreen setzen?
b) die Titelleiste des Fensters entfernen?
und
c) beim Minimieren, das Icon des Programms in der Taskleiste anzeigen lassen, und das minimierte Fenster aus der Leiste entfernen, so dass man es über das Icon aufrufen soll?
a) die Java - Anwendung auf Fullscreen setzen?
b) die Titelleiste des Fensters entfernen?
und
c) beim Minimieren, das Icon des Programms in der Taskleiste anzeigen lassen, und das minimierte Fenster aus der Leiste entfernen, so dass man es über das Icon aufrufen soll?
zu a) Fullscreen? Also ohne Fensterrahmen?
Ich kenne nur die Anweisung zum automatischen maximieren:
Code:
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
im Konstruktor der Fensterklasse.
zu b)
Code:
this.setUndecorated(true);
im Konstruktor der Fensterklasse, oder du leitest dein Fenster von Window/JWindow ab.
Eine Kombination beider Anweisungen dürfte auch einen Fullscreen-Modus erzeugen.
Das habe ich mal in dem Buch Java Game Programming zu diesem Thema gefunden:
Switching the Display to Full-Screen Mode
Now that you know all about resolutions, bit depths, and refresh rates, let's write some
code. You'll need a few objects to switch the display to full-screen mode:
A Window object. The Window object is an abstraction of what is displayed on the
screen—think of it as a canvas to draw on. The examples here actually use a JFrame,
which is a subclass of the Window class and can also be used for making windowed
applications.
A DisplayMode object. The DisplayMode object specifies the resolution, bit depth,
and refresh rate to switch the display to.
A GraphicsDevice object. The GraphicsDevice object enables you to change the
display mode and inspect display properties. Think of it as an interface to your video
card. The GraphicsDevice object is acquired from the GraphicsEnvironment object.
Here's an example of how to switch the display to full-screen mode:
Code:
JFrame window = new JFrame();
DisplayMode displayMode = new DisplayMode(800, 600, 16, 75);
// get the GraphicsDevice
GraphicsEnvironment environment =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = environment.getDefaultScreenDevice();
// use the JFrame as the full screen window
device.setFullScreenWindow(window);
// change the display mode
device.setDisplayMode(displayMode);