Hi all,
I did some Swing app in clojure. For some JLabels I want to provide an
icon, but I cannot load them. In Java the tutorial says I would do
class Foo {...
new ImageIcon(getClass().getResource("image.png"));
}
to load the image. The "image.png" is relative to the location of the
class Foo.
How do I do the same in clojure? The apps has a namespace foo.bar.baz
and the directory structure is
foo/bar/baz.clj
foo/bar/i1.png
foo/bar/i2.png
I tried (ClassLoader/getSystemResource "i1.png"), but that looks
somewhere in the clojure location, not my apps location...
Bye,
Tassilo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---