Created
March 25, 2012 19:41
-
-
Save fatlazycat/2199288 to your computer and use it in GitHub Desktop.
attempt at a gui built seesaw app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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