> ;; This is how I repaint the frame, after changing the list
> (doto *frame*
>       (.setContentPane (make-panel))
>       .repaint
>       (.setVisible true))
>

This is probably the reason it's slow (you don't say how many rects
you're drawing). It's only necessary to set the content pane of the
frame and set it visible once. After that, you should call repaint on
*just the panel*:

  (.repaint panel)

You can use add-watch on your list to call this automatically whenever
the ref changes.

If, for some reason, this is still too slow, you can use a more
explicit version of repaint [1] which requests that only a specific
area of the panel be repainted.

Hope this helps,

Dave

[1] 
http://docs.oracle.com/javase/6/docs/api/javax/swing/JComponent.html#repaint(long,%20int,%20int,%20int,%20int)

-- 
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

Reply via email to