views:

17

answers:

1

I have implemented an eclipse plugin that it launches a java application when the user clicks at a button.The bug is that the java application stops(the user clicks the exit button) the whole eclipse framework stops working. Here is the code i am using to launch the java code.

java.awt.EventQueue.invokeLater(new Runnable() {
      public void run() {
       new atag.gui.MainFrame().setVisible(true);
      }
     });

the Mainframe is a class that implements Jframe and it is inside a library

+1  A: 

Have a look at the other applications code, maybe it says System.exit(0), where a click on the exit button is handled...

A JFrame can be configured to "exit on close". Even if it is set to "dispose on close" the VM my terminate after the last displayable (AWT/Swing) window has been closed.

I didn't pay attention on first reading: You are using Swing components inside the eclipse framework: that is ... not a good idea. Plugins should only use the SWT library or use the SWT-Swing bridge to show Swing based content.

Andreas_D
Andeas it is the default window frame in java .In fact the code for the X button at the upper right and it is not handled by me
herc