swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TestControlPanel.java now archived (was Re: Simulation order


From: Paul Johnson
Subject: TestControlPanel.java now archived (was Re: Simulation order
Date: Mon, 20 Dec 1999 15:45:38 -0600

This one is now in the code archive
http://lark.cc.ukans.edu/~pauljohn/SwarmFaq/WorkingExampleCode/java

Can I ask a question about it?

1. Where does "this" get initialized/defined?  I see it is an argument
to "System.out.println ()" but don't understand why you don't have to
declare it or pass it in.  

I see from the way the example runs that "this" is a Symbol/string for
the basename of the program file?  Is that a Java thing?

It seems to me I don't have a good Java book, what is to be recommended
for somebody like me who is at an intermediate level in C?

2. How are people compiling/using a snippit like this one?

I first tried to save it under an arbitrary file name, but the compiler
forced me to call it TestControlPanel.java.  If I did not do that, the
compiler gave me an error--   

$ javacswarm StopMethodInsideSchedule.java
StopMethodInsideSchedule.java:19: Public class TestControlPanel must be
defined in a file called "TestControlPanel.java".
public class TestControlPanel extends GUISwarmImpl {
             ^
1 error

At least the error message was clear enough.  After renaming,
"javacswarm TestControlPanel.java" worked to generate
TestControlPanel.class.  Then I could execute with "javaswarm
TestControlPanel".  

Is that the way the cool people are doing it?

I notice a class file (TestControlPanel$Agent.class) pops out for which
there is no corresponding java file.  Most unnerving:



-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]