Re: Is it possible to write a java app that goes into kiosks mode?
Newbie wrote:
Is it possible to write a java app that goes into kiosks mode?
Somewhat.
Look at the two small examples below.
Arne
======================================================
import java.awt.BorderLayout;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class FS extends JFrame {
public FS() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(new JTextField("Det virker"));
}
public static void main(String[] args) {
FS fs = new FS();
fs.setVisible(true);
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
gs[0].setFullScreenWindow(fs);
}
}
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class FS2 extends JFrame {
public FS2() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(new JTextField("Det virker"));
}
public static void main(String[] args) {
FS2 fs = new FS2();
fs.setUndecorated(true);
fs.setExtendedState(JFrame.MAXIMIZED_BOTH);
fs.setVisible(true);
}
}