Skip to content

Instantly share code, notes, and snippets.

@keithrbennett
Created March 5, 2009 22:32
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 keithrbennett/74604 to your computer and use it in GitHub Desktop.
Save keithrbennett/74604 to your computer and use it in GitHub Desktop.
(defn create-converters-panel
"Creates panel containing the labels and text fields."
[]
(let [
create-an-inner-panel (fn [] (JPanel. (GridLayout. 0 1 5 5)))
label-panel (create-an-inner-panel)
text-field-panel (create-an-inner-panel)
outer-panel (JPanel. (BorderLayout.))]
(doto label-panel
(.add (JLabel. "Fahrenheit: "))
(.add (JLabel. "Celsius: ")))
(create-text-fields)
(doto text-field-panel
(.add fahr-text-field)
(.add cels-text-field))
(doto outer-panel
(.add label-panel BorderLayout/WEST)
(.add text-field-panel BorderLayout/CENTER))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment