Skip to content

Instantly share code, notes, and snippets.

@geraldodev
Created May 7, 2013 19:07
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 geraldodev/5535224 to your computer and use it in GitHub Desktop.
Save geraldodev/5535224 to your computer and use it in GitHub Desktop.
(ns bindboom
(:use [seesaw core table mig])
(:require [seesaw.bind :as bind]))
(defn example
[]
(let [a (atom nil)
p (mig-panel
:constraints ["", "[left]"]
:items [
[(checkbox :id :cb :text "Enable" )]
[(text :id :tb :columns 20)]
[(button :text "set-normal" :listen [:action (fn [e] (reset! a {:cb true :tb "Normal Values"}))])]
[(button :text "boom" :listen [:action (fn [e] (reset! a nil))])]
])
fr (frame :content p)]
(bind/bind a (bind/value p))
(invoke-later (-> fr pack! show!))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment