• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to implement the processing of events without creating a window  RSS feed

 
Yuriy Paholkov
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I am writing a program, take a screenshot by pressing F9. Processor keystrokes exists for JFrame, but how to do this handler without creating a window? Here code
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. At best, a command line application could process typed input AFTER the enter key is pressed to pass that input to your program.

Or look into JCurses (never used it nor taken a look at it myself).
 
Yuriy Paholkov
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. Sorry for probably stupid question, but is it possible then to make a window invisible? does not turn into the tray, but it is invisible, but retaining the ability to process events?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No
 
Rob Spoor
Sheriff
Posts: 20898
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Windows only process key and mouse events if that window is the active window. If it's invisible it will never be the active window.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!