• Post Reply Bookmark Topic Watch Topic
  • New Topic

disable key events like alt+tab, ctrl+alt+delete, alt+F4, etc.

 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how will i disable it? because im creating a timer/logger in an internet cafe.
some said it is impossible, but i know it will be possible, do i need to import some third party?
i would like to run it in windows and linux.
 
Darryl Burke
Bartender
Posts: 5153
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK this can't be done in Java.

edit: And how is this a Swing / AWT / SWT / JFace question?
 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im sorry if i post at the wrong place, if im going to use C to disable the hotkeys, can java be able to execute the C codes?
or i will compile the C codes first? (these is for windows)

will it take effect in linux?
 
Rob Spoor
Sheriff
Posts: 20819
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roldan Baldo wrote:can java be able to execute the C codes?

It can through JNI.

or i will compile the C codes first? (these is for windows)

You'll need to write the Java code first, using native methods for those parts you want to be executed in C. You then use javah to create a C header which you will then use as the base for the implementation in C. The C code needs to be compiled into a DLL (Windows) or .so file (Unix). Don't forget to call System.loadLibrary in your Java class; if the name of the file is rob.dll or librob.so then I need to call System.loadLibrary("rob").

will it take effect in linux?

Since this is OS dependent stuff you will need to write separate code for Linux. You can use the same C headers, the implementation needs to be completely different and the used library file will be named differently (librob.so vs rob.dll).


This is not Swing related but focuses on JNI so off to Other APIs we go!
 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, that is what i ned to know.
this is a great help.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!