File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Swing process won't die Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing process won Watch "Swing process won New topic
Author

Swing process won't die

Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
I have a swing process that won't die after I close the main JFrame. The problem is that is does not happen every time. My app does kick off a SwingWorker (java 1.6) and only seems to hang if kick off that worker. BUt again not every time I kick off that worker. Has anyone seen this type of problem before? I need a good way to trouble shoot to see why the process will not finish? I am running on RedHat 5 (I think) so any useful tools would be a great help.

Thanks,
Billy
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
What did you do about close operations when you set up your JFrame? Have you got a WindowListener which listens for your closing the JFrame?
Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
I have a WindowListener for the closing. What are you getting at? Remember this does not happen every time so I don't think its a close operation problem, but maybe it is.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
I presume your SwingWorker thread has finished? Don't know. What have you got in your Listener? Maybe somebody else will know.
Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
I call cancel(true) on the worker thread. passing true will interrupt the thread. So I guess I did all I can to stop the thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing process won't die
 
Similar Threads
Using ServletContextListener
Making asynchronous calls in Java
Slow images in jar
Kick-off Java pgm when tomcat starts
can't start J2EE 1.4 SDK