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.
Go here:
http://www.tjhsst.edu/~rlatimer/modeling/ychen/SugarScape2.html
I have a screenshot of the intended look - the yellow background for the
sugarworld.
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)
try{
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:
<p>
<applet code="sim.display.SimApplet.class" archive="./MyMason2.jar"
height="30" width="300">
<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">
</applet>
<p>
Thanks, Randy Latimer