wood burning stoves
The moose likes Swing / AWT / SWT and the fly likes Key disableing from our Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Key disableing from our Application" Watch "Key disableing from our Application" New topic

Key disableing from our Application

Viswanatha GB

Joined: Sep 19, 2001
Posts: 16
Hi All,
I have a application which is developed usng JEC Swing There is a Frame which is opened with Login Oprion.
i want to disable all the Keys other then some Char & Numaric) when this frame is opened.
When i boot the system i will open My Applcation after that user should able to open any applications fromn Desktop..like if he press start menu key,F1...F2...some thing like this.
can i do this ? pls let me know how can i achive this through Event OR some other way..
Thanks in Advace

==============(**)=================<br />Viswanatha.G.B<br />Sr.Software Engineer<br />IBM<br />==============(**)=================
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

First, viswagb, please re-register with a username following the JavaRanch UserName Guidelines. Your username has to be in the format "First Name" + space + "Last Name".

It sounds like you want to disable all keys when your login screen comes up, not allowing the user to use alt-tab to switch to another program, or Ctrl-C to kill it, or windows key to bring up menu. This isn't possible because Windows catches system keypresses like Ctrl-C, Alt-Tab, and windows key first and deals with them. There is no way a pure Java program can interrupt the OS from getting these key presses. (There may be able to be some way to use JNI to do this, but I don't know how to do it...)


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link: http://aspose.com/file-tools
subject: Key disableing from our Application
It's not a secret anymore!