I am creating a desktop application using the JDesktopPane. I'm almost complete, but开发者_StackOverflow when I press ctrl + alt + del, it leaves my application. How can I prevent that action?
Fact is Alt+Ctrl+Del never actually entering your application. Os traps Alt+Ctrl+Del before it is send to your application. So you can't trap it.
Alt+Ctrl+Del cannot be overridden. It is a security feature.
You cannot do that. The behavior of Alt+Ctrl+Del is enforced by the operating system, for good reasons: it makes sure that you can always bail-out of a faulty application.
http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx
lists several possibilities, from disabling the taskmanager to injecting keyboard hooks. But I doubt there's some built-in java functionality for that.
精彩评论