MASON-INTEREST-L Archives

February 2008

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:
Siamak Sarmady <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Wed, 13 Feb 2008 16:41:52 +0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Hello,

In one of my programs I am just using the Display component of Mason.

The problem is that when I close Display window, program continues to
run in Background. What else should I do to terminate the entire
program? (Is it the state object which remains in memory?)

Regards,
Mac



public class Main extends GUIState
{
        ....
	protected Main(SimState state)
	{
		super(state);
	}

	public static void main(String[] args)
	{
		System.out.println("Loading Application : " + args[0]);

		Main main = new Main();
		main.initiateSettings(args[0]);
		Console c = new Console(main);
		//c.setVisible(true);
		c.setVisible(false);
		main.start();
	}

	public Main()
	{
		super(new SimState(System.currentTimeMillis()));
	}
...
}

ATOM RSS1 RSS2