Permalink
Browse files

Playing with Seesaw

  • Loading branch information...
1 parent f0f8dd1 commit 1848779a01f20fac7667f196faae2641a261cd62 @djwhitt committed May 1, 2012
Showing with 29 additions and 0 deletions.
  1. +29 −0 clj/src/clj/ui.clj
View
@@ -0,0 +1,29 @@
+(ns sandbox.ui
+ (:use [seesaw core dev]))
+
+(comment
+
+ (-> (frame :title "Hello" :content "Hi there")
+ pack!
+ show!)
+
+ (-> (frame :title "Hello"
+ :content (vertical-panel :items ["This" "is" "a" "vertical"
+ "stack of" "JLabels"]))
+ pack!
+ show!)
+
+ (alert "Test")
+
+ (-> (frame
+ :title "Test"
+ :content
+ (let [choose (fn [e] (alert "I should open a file chooser"))]
+ (flow-panel
+ :items ["File" [:fill-h 5]
+ (text (System/getProperty "user.dir")) [:fill-h 5]
+ (action :handler choose :name "...")])))
+ pack!
+ show!)
+
+ )

0 comments on commit 1848779

Please sign in to comment.