Can you make an unclosed and indivisible Java application?

Is there any way to ensure that users cannot close or leave my swing application? I tried to make it full screen, but you can still leave it with alt tab, and it doesn't work when you decide to use the joptionpane dialog

So, is there any way to make users only use this Java program on the device?

Editor: some people want to know the purpose The application should be "embedded" into the handheld device (running under Windows), so users of the device will use it because we intend to use it – for example, they won't play freecell or perform worse, rather than do actual work Have you seen the ticket booth? They are locked well, you can't just close their big flash GUI and reach the windows desktop!

Solution

Okay @ Daniel shows you how to make a Java application non closing (1 to him): Call:

JFrame #setdefaultcloseoperation (JFrame. Do_noting_on_close);

On the JFrame instance

To make sure you can't leave it, press Ctrl, ALT del, alt tab, etc. you may do this (only for Windows):

1) Disable taskmanager / Ctrl Alt del:

>Set registry key:

Via reg script or CMD exe.

2) For example, disable all shortcut keys together with alt tab, see here (download / use *. Reg script and execute through CMD)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>