Skip to content

Instantly share code, notes, and snippets.

@amalloy
Forked from pcomans/frame.clj
Created July 22, 2011 22: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 amalloy/1100537 to your computer and use it in GitHub Desktop.
Save amalloy/1100537 to your computer and use it in GitHub Desktop.
(defn mkframe []
(doto (java.awt.Frame.)
(.setVisible true)
(.setSize (java.awt.Dimension. 512 512))
(-> .getGraphics (.drawString (.toString (java.util.Date.))
160 256))))
@pcomans
Copy link

pcomans commented Jul 22, 2011

(defn mkframe2 []
  (let [frame (doto (java.awt.Frame.)
    (.setVisible true)
    (.setSize (java.awt.Dimension. 512 512)))]
    (let [gfx (.getGraphics frame)]
      (.drawString gfx (.. (java.util.Date.) toString) 160 256))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment