Created
January 22, 2016 04:24
-
-
Save emidln/555c96a26dab2483c671 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn display-image | |
[image] | |
(let [frame (doto (javax.swing.JFrame. "Display Image") | |
(.setBounds 0 0 (.getWidth image) (.getHeight image)) | |
(.setVisible true)) | |
canvas (proxy [java.awt.Canvas] [] | |
(paint [g] (.drawImage g image nil nil)) | |
(update [g] (.drawImage g image nil nil)))] | |
(.add (.getContentPane frame) canvas))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment