Hi, construct the JPanel outside the atom, add all the listeners and then add the panel to structure in the atom.
(let [panel (JPanel. ..)] (add-listener-stuff panel the-atom) (swap! the-atom assoc :SpiffyPanel panel)) Side-effecting things shouldn't be done inside the swap! since it can be retried multiple times. So you would set up a panel, find that you have to retry, start over, retry, start over, retry, .... Sincerely Meikel -- 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 To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.