Hallo Freunde,
Mein Programm hier zeigt wie in manchen Bio-Saunen abwechselnd Rot Gelb Grün Blau für jeweils 3 Minuten.
Das funzt auch, doch ich schaffe es einfach nicht, den Bildschirm auf Vollbild zu schalten.
Und es soll komplett VOLLBILD sein, also auch keine Java-Zeile oben. Bei mir hat es zudem immernoch ca. 20 Pixel Rand, wo die Andwendungen drunter vorschauen.
Kann es an meinen Laptop liegen, weil da ein externes Display angeschlossen ist ?
Wer weiß weiter ?
[CODE lang="java" title="BioFarbenprogramm"]package com.mycompany.biofarben;
import java.awt.Color;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
public class BioFarben3 extends JFrame
{
private GraphicsDevice device;
Color rot=new Color(0xFD1820);
Color gelb=new Color(0xFDFD00);
Color gruen=new Color(0x0BB12e);
Color blau=new Color(0x1010FD);
long pause=180000;
BioFarben3() throws InterruptedException
{
this.setLayout(null);
this.setSize(500,500);
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
device=ge.getDefaultScreenDevice();
if (device.isFullScreenSupported())
{
device.setFullScreenWindow(this);
}
for (int k=1; k<1000; k++)
{
this.getContentPane().setBackground(rot);
Thread.sleep(pause);
this.getContentPane().setBackground(gelb);
Thread.sleep(pause);
this.getContentPane().setBackground(gruen);
Thread.sleep(pause);
this.getContentPane().setBackground(blau);
Thread.sleep(pause);
}
}
public static void main(String[] args) throws InterruptedException
{
new BioFarben3();
}
}[/CODE]
Mein Programm hier zeigt wie in manchen Bio-Saunen abwechselnd Rot Gelb Grün Blau für jeweils 3 Minuten.
Das funzt auch, doch ich schaffe es einfach nicht, den Bildschirm auf Vollbild zu schalten.
Und es soll komplett VOLLBILD sein, also auch keine Java-Zeile oben. Bei mir hat es zudem immernoch ca. 20 Pixel Rand, wo die Andwendungen drunter vorschauen.
Kann es an meinen Laptop liegen, weil da ein externes Display angeschlossen ist ?
Wer weiß weiter ?
[CODE lang="java" title="BioFarbenprogramm"]package com.mycompany.biofarben;
import java.awt.Color;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
public class BioFarben3 extends JFrame
{
private GraphicsDevice device;
Color rot=new Color(0xFD1820);
Color gelb=new Color(0xFDFD00);
Color gruen=new Color(0x0BB12e);
Color blau=new Color(0x1010FD);
long pause=180000;
BioFarben3() throws InterruptedException
{
this.setLayout(null);
this.setSize(500,500);
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
device=ge.getDefaultScreenDevice();
if (device.isFullScreenSupported())
{
device.setFullScreenWindow(this);
}
for (int k=1; k<1000; k++)
{
this.getContentPane().setBackground(rot);
Thread.sleep(pause);
this.getContentPane().setBackground(gelb);
Thread.sleep(pause);
this.getContentPane().setBackground(gruen);
Thread.sleep(pause);
this.getContentPane().setBackground(blau);
Thread.sleep(pause);
}
}
public static void main(String[] args) throws InterruptedException
{
new BioFarben3();
}
}[/CODE]