MASON-INTEREST-L Archives

November 2005

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
RDLatimer <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 29 Nov 2005 12:59:30 -0500
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (42 lines)
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

ATOM RSS1 RSS2