Background Process « Component « Java Swing Q&A





1. What's the proper background process behaviour for a non-GUI Java app?    stackoverflow.com

What's the proper way for a Java command line application to do background work without hogging resources? Should it use sleep() in the loop or is there a more elegant/efficient way? ...

2. Processing AnimationThread as a background task in Swing    stackoverflow.com

I am writing an application using Processing PApplet ( http://processing.org/ ) inside a Swing gui and those two are not a happy marriage. I have a listener for JButton ...

3. Background Process to play sound when keystroke is hit?    coderanch.com

Hello, I would like to have my application do something when someone presses the "T" key. This in itself, isnt hard. However, I would like it to happen even if my program doesnt have focus. I want it to play a .wav file when I hit the T key. Any ideas? I cant seem to find a way to get the ...

4. Starting background process    coderanch.com

Are you setting the default close operation of the frame to EXIT_ON_CLOSE? That just calls System.exit() when you close your frame and kills the JVM. Same thing as if you attached a WindowListener to your frame and called System.exit(). If you want your frame to go away, but the thread to keep running, either hide (setVisible( false ) or HIDE_ON_CLOSE) or ...