mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-08-15 12:27:50 +00:00
bug fix for when disposing window
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.contikimote;
|
||||||
@@ -126,7 +126,8 @@ public class ContikiMoteTypeDialog extends JDialog {
|
|||||||
|
|
||||||
final ContikiMoteTypeDialog myDialog = new ContikiMoteTypeDialog(
|
final ContikiMoteTypeDialog myDialog = new ContikiMoteTypeDialog(
|
||||||
parentFrame);
|
parentFrame);
|
||||||
|
myDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
|
||||||
|
|
||||||
myDialog.myMoteType = moteTypeToConfigure;
|
myDialog.myMoteType = moteTypeToConfigure;
|
||||||
myDialog.myGUI = simulation.getGUI();
|
myDialog.myGUI = simulation.getGUI();
|
||||||
myDialog.allOtherTypes = simulation.getMoteTypes();
|
myDialog.allOtherTypes = simulation.getMoteTypes();
|
||||||
@@ -807,6 +808,31 @@ public class ContikiMoteTypeDialog extends JDialog {
|
|||||||
contentPane.add(mainScrollPane, BorderLayout.CENTER);
|
contentPane.add(mainScrollPane, BorderLayout.CENTER);
|
||||||
contentPane.add(buttonPane, BorderLayout.SOUTH);
|
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();
|
// pack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user