aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Stopping AWT threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Stopping AWT threads" Watch "Stopping AWT threads" New topic
Author

Stopping AWT threads

Kurro Zaki
Greenhorn

Joined: Dec 08, 2009
Posts: 14
Here I am again :s
This time I'm having problems stopping Swing stuff
What I'm doing now is displaying a splash screen in swing when my app start (it has loading bars and stuff so don't suggest using anything other than swing). Then when my application is loaded and updated I need to close the swing stuff and then I start drawing on the screen with JME (Java Monkey Engine). However I can't call System.exit(0); when I want the swing stuff to stop because my application has to stay running. At the moment I call splashFrame.dispose(); to try and stop everything but that doesn't work (splashFrame is the JFrama in which everything happens). I just stop drawing the frame without stopping the AWT threads and as a result if I stop JME my application seems to have stopped but it stays running in the background.
Anyone knows a way of stopping all the swing stuff without calling System.exit(0);?
Kurro Zaki
Greenhorn

Joined: Dec 08, 2009
Posts: 14
OMG

I thinks I'm starting to get stupid :s
Disregard my post people. The reason that my application doesn't stop was that the threads in my ExecutorService weren't deamon threads :s
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Stopping AWT threads