Extending a Java Swing class in Clojure

Posted by mikera on Stack Overflow See other posts from Stack Overflow or by mikera
Published on 2010-06-01T21:37:15Z Indexed on 2010/06/01 21:43 UTC
Read the original article Hit count: 173

Filed under:
|
|
|

I'm trying to extend a Java Swing component in Clojure, i.e. I want to extend a javax.swing.JComponent and add some custom methods implemented in pure Clojure in addition to all the standard inherited methods.

I've tried using "proxy" which works great if I just want a single instance (in the same way as an anonymous inner class). However I'd really like a named class so that I can generate an arbitrary number of instances.

What's the recommended way of doing this?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing