MASON-INTEREST-L Archives

March 2011

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML 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:
"Samuel W. Brett (SWB)" <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Wed, 2 Mar 2011 11:54:00 -0500
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (1613 bytes) , FlockersWithUI.java (5 kB)
Here is what I have. Still getting the same problem with chart not
initializing on my end. If you put in logs before and after the
constructor, it's returning somewhere in the chart constructor where it
calls its superclass constructor. I have no idea why though.

-Sam 

-----Original Message-----
From: MASON Multiagent Simulation Toolkit
[mailto:[log in to unmask]] On Behalf Of Sean Luke
Sent: Wednesday, March 02, 2011 11:43 AM
To: [log in to unmask]
Subject: Re: Creating Charts in Mason v15

On Mar 2, 2011, at 11:32 AM, Samuel W. Brett (SWB) wrote:

> Okay, here are the problems I am having. scheduleImmediateRepast 
> method is deprecated in my version of Mason. Frame.show() is 
> deprecated as well, not sure that matters as I guess the pack method 
> takes care of that now.

Ah right.  Don't worry about that. These methods will still work but
you're right, they might go away.  Instead, use
scheduleRepeatingImmediatelyAfter(new Steppable() { ... });  and
Frame.setVisible(true);

pack() does not set a frame to visible to my knowledge.


> The chart never gets initialized in my init method for some reason. 
> When the start method is called, chart is null.

In the version of the code I sent you as well?  That would be most
unusual -- it works fine here.

Look carefully at the difference between your code and the one I
provided, particularly the init() and start() methods.  Since mine is
working, there's got to be some important difference.

Also, just for debugging consistency, make sure you're using the version
of JFreeChart that's provided in the libraries.zip file on the MASON
website.

Sean


ATOM RSS1 RSS2