0.1.0-SNAPSHOT permalink Arrow_down_16x16

grid-bag-example

clj-swing.example

  • (grid-bag-example)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clj_swing/example.clj:44 top

(defn grid-bag-example []
  (frame :title "Sort Visualizer" :layout (GridBagLayout.) :constrains (java.awt.GridBagConstraints.) :name fr
	 :show true :pack true
		  [:gridx 0 :gridy 0 :anchor :LINE_END
		   _ (label "Algorithms")
		   :gridy 1
		   _ (label "Button")
		   :gridx 1 :gridy 0 :anchor :LINE_START
		   _ (combo-box [] :model (seq-ref-combobox-model sr selected))
		   :gridy 1
		   _ (button "Run Algorithm" 
			     :action ([_] (if @selected (dosync (alter lm conj @selected)))))
		   :gridx 0 :gridy 2 :gridwidth 2 :anchor :LINE_START
		   _ (text-field :str-ref str-ref :columns 10)
		   :gridx 3 :gridy 0 :gridheight 3 :anchor :CENTER
		   _ (scroll-panel (jlist :model (seq-ref-list-model lm)) :preferred-size [150 100])]))
Vars in clj-swing.example/grid-bag-example: defn
Used in 0 other vars

Comments top

No comments for grid-bag-example. Log in to add a comment.