package javasoft.sqe.tests.api.java.awt.GraphicsDevice;

import java.awt.Frame;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;

import javax.swing.SwingUtilities;

public class Test1 {
	public static void main(String[] args) throws Exception {
		GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
		for (GraphicsDevice device : devices) {
			boolean displayChangeSupported = device.isDisplayChangeSupported();
			System.out.println(displayChangeSupported);
			boolean fullScreenSupported = device.isFullScreenSupported();
			System.out.println(fullScreenSupported);

			final Frame f = new Frame();
			f.setUndecorated(true);

			SwingUtilities.invokeAndWait(new Runnable() {
				@Override
				public void run() {
					device.setFullScreenWindow(f);
				}
			});
			Thread.sleep((long) (3000 * 1));
			System.out.println("after full screen");

			displayChangeSupported = device.isDisplayChangeSupported();
			System.out.println(displayChangeSupported);
			fullScreenSupported = device.isFullScreenSupported();
			System.out.println(fullScreenSupported);
			f.dispose();


		}
	}

}
