Skip to content

Commit

Permalink
create a final sulotion
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Aug 10, 2016
1 parent 2e3404c commit 945c588
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
25 changes: 11 additions & 14 deletions .idea/artifacts/App.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions App/src/view/Factory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion App/src/view/FinderGUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 945c588

Please sign in to comment.