diff --git a/.idea/artifacts/App.xml b/.idea/artifacts/App.xml index 938e48c..d903e1c 100644 --- a/.idea/artifacts/App.xml +++ b/.idea/artifacts/App.xml @@ -2,23 +2,20 @@ $PROJECT_DIR$/jar/App - - - - - - - + + + + + + - - - - - - - + + + + + diff --git a/App/src/view/Factory.kt b/App/src/view/Factory.kt index f5e5252..bdbc265 100644 --- a/App/src/view/Factory.kt +++ b/App/src/view/Factory.kt @@ -50,8 +50,6 @@ object Factory { minusButton.addActionListener { action -> manageAverage(-5) } frame.add(minusButton, BorderLayout.EAST) - setupFrame() - frame.defaultCloseOperation = JFrame.EXIT_ON_CLOSE frame.isResizable = false frame.isVisible = true diff --git a/App/src/view/FinderGUI.kt b/App/src/view/FinderGUI.kt index 7e88b63..7c4ab41 100644 --- a/App/src/view/FinderGUI.kt +++ b/App/src/view/FinderGUI.kt @@ -9,11 +9,12 @@ import java.awt.BorderLayout * Created by ice1000 on 16-8-6. */ open class FinderGUI(title: String, var graph: Finder666) { - val frame = Factory.create(title, { setupFrame() }, { file -> graph = graph.createFromFile(file) }) val panel = FinderImagePanel(graph) + val frame = Factory.create(title, { setupFrame() }, { file -> graph = graph.createFromFile(file) }) init { frame.add(panel, BorderLayout.CENTER) + setupFrame() } private fun setupFrame() {