Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I exit a NetBeans Platform GUI application?

Tags:

java

netbeans

How to I programmatically properly exit a NetBeans Platform application when the TopComponent has been declared in an XML file?

like image 818
kmort Avatar asked Jun 14 '26 11:06

kmort


1 Answers

I'm not sure what you mean by "when the TopComponent has been declared in an XML file" but the answer for how to properly exit a NetBeans Platform application is:

LifecycleManager.getDefault().exit();

What you definitely should not do is the normal Java way: System.exit();.

like image 175
peterh Avatar answered Jun 16 '26 10:06

peterh