I need a way to stop people using other programs while my Java program is running. i.e stopping people switch tabs and pressing Alt-F4.
To make the program full screen use;
window.setExtendedState(Frame.MAXIMIZED_BOTH); //maximise window
window.setUndecorated(true); //remove decorations e.g. x in top right
And to make the window always on top use(To stop people using other running programs);
window.setAlwaysOnTop(true);
You're not going to be able to do this at the Java level - you'll need to put the operating system into a "Kiosk Mode" of some kind.
Unsolicited commentary - Do you need this because you (or your customer) hate your users, and want them to curse you forever? Are you planning to add features like "shut down the computer" to your program?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With