Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing process won't die

 
Bobby Anderson
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50212
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50212
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic