Is it possible to write a java app that goes into kiosks mode?

A

Arne Vajhøj

Newbie said:
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);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top