File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Key disableing from our Application

Viswanatha GB
Greenhorn

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.
Example:
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
Viswa
======


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

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...)

-Nate


-Nate
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
 
Similar Threads
How to keep track of the frames that are opened from Applet
let me know
enter key events in a page containing 2 or more than 2 buttons
Windows opened from menu items move down and to the right
Hide Frame or Dialog from System task bar