Okay...eleven days later and I've finally got something that works! You can find a fully working Clojure version of GraphEditor.java at
http://gist.github.com/398198 Clojure beginners, there is a lot you can learn from comparing the Java and Clojure versions of this program (though Clojure programming style is NOT one of them). I'm including *some* of the introductory comments at the top of the page, below, in the hopes that this will whet somebody's interest. Again, thanks for everybody's suggestions! --Gregg ----- comments from file ----- ; This is the "Graph Editor" sample program for the Piccolo2D structured 2D ; graphics framework. It draws 50 circular nodes, then draws 50 lines ; (called "edges" in the code) between randomly selected nodes. On mouseover, ; nodes turn red. As you drag a node to a new position, the lines stretch and ; stay with the node. ... ; ; **************** ; *IMPORTANT NOTE* This program does not represent good Clojure style, so ; **************** ; please don't write Clojure programs that imitate this style. My purpose in ; writing this program was to discover how to use Clojure to do tasks commonly ; done in Java. YOU DO NOT NEED TO BE INTERESTED IN THE PICCOLO2D LIBRARY TO ; FIND SOMETHING OF INTEREST IN THIS CODE. It is not at all obvious how to use ; gen-class, how to subclass an existing Java class, how to mix Java constructs ; with Clojure data structures, or how to add event handlers to a Swing-based ; Clojure program. Studying the two versions of this program will enable you to ; creates certain kinds of Clojure programs much faster and with much less ; frustration than would otherwise be possible. Enjoy! ----- end of e-mail ----- -- 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