We're doing a Sugarscape-type project.
The background sugarscape world is read in with a sugarscape.txt file.
This works as an application, but doesn't seem to work as an applet.
I have a screenshot of the intended look - the yellow background for the
If you run the applet model, there is no background?
Both of the files listed - SugarScape2.java and RuleG2.java
read the data file - sugarfield.txt (from the sugarfield method)
FileReader fileReader = new FileReader("sim/app/sugarscape/sugarfield.txt");
BufferedReader sugarfield = new BufferedReader(fileReader);
This version works as an application (we see the background)
java -classpath myMason2.jar:. sim.app.sugarscape.SugarScapeWithUI2
The applet version doesn't show the background.
Here's the applet code from the .html file:
<applet code="sim.display.SimApplet.class" archive="./MyMason2.jar"
<param name="CODE" value="sim.display.SimApplet.class">
<param name="type" value="application/x-java-applet;version=1.1">
<param name="ARCHIVE" value="./myMason2.jar">
<param name="Simulation" value="sim.app.sugarscape.SugarScapeWithUI2">
<param name="Name" value="SugarScape Model">
Thanks, Randy Latimer