public SmallWorld() {
	
	// Set up display.

        super("Small World Agents [1.0]");
        
	MenuBar menuBar = new MenuBar();
	setMenuBar(menuBar);

        Menu layoutMenu = new Menu("Layout"); 
	menuBar.add(layoutMenu);
        
        ringWorldMenuItem = new MenuItem("Ring World");
	layoutMenu.add(ringWorldMenuItem);
	ringWorldMenuItem.addActionListener(this);
        
        importMenuItem = new MenuItem("Import Agents");
	layoutMenu.add(importMenuItem);
        
        saveMenuItem = new MenuItem("Save Agents");
	layoutMenu.add(saveMenuItem);
	saveMenuItem.setEnabled(false);
        
        AgentIO agentIO = new AgentIO(this, importMenuItem, saveMenuItem);
        
	importMenuItem.addActionListener(agentIO);
        saveMenuItem.addActionListener(agentIO);
	
	Menu runMenu = new Menu("Run"); 
	menuBar.add(runMenu);

	smallWorldMenuItem = new MenuItem("Small World it");
	runMenu.add(smallWorldMenuItem);
	smallWorldMenuItem.addActionListener(this);
	smallWorldMenuItem.setEnabled(false);

        runMenuItem = new MenuItem("Run Agents");
	runMenu.add(runMenuItem);
	runMenuItem.addActionListener(this);
        runMenuItem.setEnabled(false);
        
	Menu viewMenu = new Menu("View"); 
	menuBar.add(viewMenu);
	
	viewRealMenuItem = new MenuItem("View real geography");
	viewMenu.add(viewRealMenuItem);
	viewRealMenuItem.addActionListener(this);
	viewRealMenuItem.setEnabled(false);
	
	viewGraphMenuItem = new MenuItem("View graph geography");
	viewMenu.add(viewGraphMenuItem);
	viewGraphMenuItem.addActionListener(this);
	        
        Menu otherMenu = new Menu("Other"); 
	menuBar.add(otherMenu);
        
        MenuItem aboutMenuItem = new MenuItem("About Small World Agents");
        otherMenu.add(aboutMenuItem);
      	MenuItem helpMenuItem = new MenuItem("Help");
	otherMenu.add(helpMenuItem);
        Help help = new Help(aboutMenuItem, helpMenuItem);
        aboutMenuItem.addActionListener(help);
        helpMenuItem.addActionListener(help);
        
        
	MenuItem optionsMenuItem = new MenuItem("Options");
	otherMenu.add(optionsMenuItem);

        
        GridBagLayout gridBag = new GridBagLayout();
	setLayout(gridBag);
	GridBagConstraints c = new GridBagConstraints();
        
        c.anchor = GridBagConstraints.SOUTHWEST;
	c.insets = new Insets(5, 5, 5, 5); 
	c.ipadx = 2;
	c.ipady = 2;
	c.fill = GridBagConstraints.HORIZONTAL;
		
	c.gridx = 0;
	c.gridy = 0;
	c.gridwidth = 1;
	c.gridheight = 1;
        
        canvas = new GUICanvas();
	canvas.setSize(width + 2, height + 2);
	gridBag.setConstraints(canvas, c);
        add(canvas);
        
        options = new Options (this, canvas, optionsMenuItem);
	optionsMenuItem.addActionListener(options); 
        
        c.gridy++;
        helpLabel = new Label(" Pick a Layout to start (Options are under 'Other')");
        helpLabel.setSize(150,50);
        gridBag.setConstraints(helpLabel, c);
        add(helpLabel);
	
	setLocation(200,200);
	setSize(width + 12,height + 102);
	addWindowListener(new WindowAdapter(){
	    public void windowClosing(WindowEvent e) {
		System.exit(0);
	    }
	});
	
	setVisible(true);
	
	
    } // End of constructor.