The best way to use Swing from Clojure is the seesaw library.<https://github.com/daveray/seesaw>It managed to clojurize Swing remarkably well, and is trying it's hardest to get all glaring inconsistencies out of swing use. Simple example to set a background for a frame:
(frame :title "Hello" :content (label :icon (clojure.java.io/file image))) On Thursday, April 24, 2014 8:39:12 PM UTC+2, Christopher Howard wrote: > > This is, I think, as much of a Java question as a Clojure question > (I'm learning both at the same time). I'm writing a small desktop > application, and I need to paint a few images in one part of the > window (contained in PNGs). I'm looking through AWT/Swing/Graphics2D > documentation, but I am a little unclear about the correct/modern way > of doing this. > > Is Canvas the component I need? If so, how do I subclass it and > override the paint method (from within Clojure). Or is there a better > way to approach this? > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.