I thought I just had a eurika moment when my plugin feature for my project appeared to be working, but not everything is working as expected. I've set up for my project the ability to include plugins and I wanted to have the ability to allow the plugins to have their own Graphical User Interface. So I set up a plugin class that extends JFrame to just display a couple simple JLabels to prove it was launching properly with a reference back to the main application. All of this part is certainly working for me, until I went to close the plugins JFrame! When I did that, the whole application closed. I didn't expect that. I expected the main application to remain running, and for the plugin's window to close independantly. My understanding is that a plugin is supposed to run in its own thread context, so why do I see this behavior? How do I fix it? Is there a property I'm missing that I should be setting?
Following are the two classes that make up the plugin. There's nothing special about them. I'm just obviously missing something that should be incorporated to prevent the TestFrameA from shutting down the application when I go to close it.
There are no new questions, but there may be new answers.
Joined: Sep 24, 2003
Damn! It had to be somethng stupid, didn't it! I've used that line this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) so many times in previous projects I didn't expect it to crash the whole app in this particular scenario. I changed it to this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE). That worked. Thanks for the guidance.