aspose file tools
The moose likes Beginning Java and the fly likes how to implement the processing of events without creating a window Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "how to implement the processing of events without creating a window" Watch "how to implement the processing of events without creating a window" New topic
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
    
    3

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
    
    3

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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to implement the processing of events without creating a window
 
Similar Threads
How to transfer a bufferedImage Object?
Capturing Screen
random mouse pointer movement
nullPointerException found regarding Window
keypress + Robot + Method