Skip to content

Instantly share code, notes, and snippets.

@fatlazycat
Created March 25, 2012 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatlazycat/2199288 to your computer and use it in GitHub Desktop.
Save fatlazycat/2199288 to your computer and use it in GitHub Desktop.
attempt at a gui built seesaw app
(ns finance.core
(:use [seesaw.core])
(:require [seesaw.selector :as selector]))
(defn identify
"Given a root widget, find all the named widgets and set their Seesaw :id
so they can play nicely with select and everything."
[root]
(doseq [w (select root [:*])]
(if-let [n (.getName w)]
(selector/id-of! w (keyword n))))
root)
(defn test-panel
[]
(let [form (identify (gui.TestPanel.))]
form))
(defn -main [& args]
(invoke-later
(let [form (test-panel)]
(-> (frame :title "Hello",
:content form,
:on-close :exit)
pack!
show!))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment