| Author |
how to implement the processing of events without creating a window
|
Yuriy Paholkov
Greenhorn
Joined: May 27, 2010
Posts: 2
|
|
|
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
Joined: May 03, 2008
Posts: 4167
|
|
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).
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Yuriy Paholkov
Greenhorn
Joined: May 27, 2010
Posts: 2
|
|
|
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
Joined: May 03, 2008
Posts: 4167
|
|
|
No
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
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.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: how to implement the processing of events without creating a window
|
|
|