bug fix for when disposing window
This commit is contained in:
parent
67f08c398e
commit
e4372605fb
1 changed files with 28 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ContikiMoteTypeDialog.java,v 1.15 2007/01/10 08:48:13 fros4943 Exp $
|
||||
* $Id: ContikiMoteTypeDialog.java,v 1.16 2007/03/22 09:34:50 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.contikimote;
|
||||
|
@ -126,7 +126,8 @@ public class ContikiMoteTypeDialog extends JDialog {
|
|||
|
||||
final ContikiMoteTypeDialog myDialog = new ContikiMoteTypeDialog(
|
||||
parentFrame);
|
||||
|
||||
myDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
|
||||
|
||||
myDialog.myMoteType = moteTypeToConfigure;
|
||||
myDialog.myGUI = simulation.getGUI();
|
||||
myDialog.allOtherTypes = simulation.getMoteTypes();
|
||||
|
@ -807,6 +808,31 @@ public class ContikiMoteTypeDialog extends JDialog {
|
|||
contentPane.add(mainScrollPane, BorderLayout.CENTER);
|
||||
contentPane.add(buttonPane, BorderLayout.SOUTH);
|
||||
|
||||
addWindowListener(new WindowListener() {
|
||||
public void windowDeactivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowIconified(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowDeiconified(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowOpened(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowClosed(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowActivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
public void windowClosing(WindowEvent e) {
|
||||
myMoteType = null;
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
|
||||
// pack();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue