[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

JFrame application functions well, but still resident on exit

JFrame application functions well, but still resident on exit. I can do a ps on the process job an all are active processes in memory, which were run. I am doing a show() to display the JFrame and a dispose() on close.
Am I not shutting the app down properly?
0
rayskelton
Asked:
rayskelton
  • 4
  • 4
2 Solutions
 
objectsCommented:
You need to use System.exit(). Reason being that there are still threads running.
0
 
jimmackCommented:
Try adding the following to the JFrame.

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
0
 
objectsCommented:
> setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

which make a call to System.exit() ;)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
jimmackCommented:
That's right ;-)

Sorry objects I just got through answering another question (I hope you don't feel I'm treading on your toes here ;-)) where the author had used a WindowAdapter, so I thought I'd post the same line here ;-)
0
 
objectsCommented:
> I hope you don't feel I'm treading on your toes here ;-)

not at all, just clarifying the difference.
0
 
jimmackCommented:
Phew!

;-)
0
 
objectsCommented:
0
 
jimmackCommented:
;-)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now