M
mcampo84
Hi all,
I'm currently trying to convert a java application based on Piccolo
(http://www.cs.umd.edu/hcil/piccolo/) to an applet - it's pretty much a
family tree that shows pictures along with the names. I had it running
fine as a standalone application, but the imbedded applet conversion is
giving me a few problems. Originally, I was creating some PImage nodes
with the PImage(String) constructor and that was working fine. With
the applet, however, I've had to move the image files to a folder I
named "images" and included it in the src folder that NetBeans provides
me - so now the images are wrapped up in the jar. I modified my code
so that it looks like this:
private final ClassLoader cl = getClass().getClassLoader();
private final String PERSON_ICON = String.valueOf(
cl.etResource( "images/person.gif"));
private final Image PERSON_IMAGE =
Toolkit.getDefaultToolkit().getImage(PERSON_ICON);
.
.
.
entityImage = new PImage(PERSON_IMAGE);
The program runs, but I get an error message that says "media tracker
errored image load" for every node I try to create.
Any suggestions?
-mc
I'm currently trying to convert a java application based on Piccolo
(http://www.cs.umd.edu/hcil/piccolo/) to an applet - it's pretty much a
family tree that shows pictures along with the names. I had it running
fine as a standalone application, but the imbedded applet conversion is
giving me a few problems. Originally, I was creating some PImage nodes
with the PImage(String) constructor and that was working fine. With
the applet, however, I've had to move the image files to a folder I
named "images" and included it in the src folder that NetBeans provides
me - so now the images are wrapped up in the jar. I modified my code
so that it looks like this:
private final ClassLoader cl = getClass().getClassLoader();
private final String PERSON_ICON = String.valueOf(
cl.etResource( "images/person.gif"));
private final Image PERSON_IMAGE =
Toolkit.getDefaultToolkit().getImage(PERSON_ICON);
.
.
.
entityImage = new PImage(PERSON_IMAGE);
The program runs, but I get an error message that says "media tracker
errored image load" for every node I try to create.
Any suggestions?
-mc