mirror of https://github.com/zlatinb/muwire
destroy mvc group on options window close
parent
00c12cfd49
commit
07dfc0a1d1
|
@ -6,6 +6,10 @@ import griffon.metadata.ArtifactProviderFor
|
||||||
|
|
||||||
import javax.swing.JDialog
|
import javax.swing.JDialog
|
||||||
import javax.swing.SwingConstants
|
import javax.swing.SwingConstants
|
||||||
|
|
||||||
|
import java.awt.event.WindowAdapter
|
||||||
|
import java.awt.event.WindowEvent
|
||||||
|
|
||||||
import javax.annotation.Nonnull
|
import javax.annotation.Nonnull
|
||||||
|
|
||||||
@ArtifactProviderFor(GriffonView)
|
@ArtifactProviderFor(GriffonView)
|
||||||
|
@ -39,6 +43,12 @@ class OptionsView {
|
||||||
d.getContentPane().add(p)
|
d.getContentPane().add(p)
|
||||||
d.pack()
|
d.pack()
|
||||||
d.setLocationRelativeTo(mainFrame)
|
d.setLocationRelativeTo(mainFrame)
|
||||||
|
d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE)
|
||||||
|
d.addWindowListener(new WindowAdapter() {
|
||||||
|
public void windowClosed(WindowEvent e) {
|
||||||
|
mvcGroup.destroy()
|
||||||
|
}
|
||||||
|
})
|
||||||
d.show()
|
d.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue