public masterControl(){
		// create main controls
		buttons[0] = new JButton("New");
		buttons[1] = new JButton("Play/Pause");
		buttons[2] = new JButton("Step");
		//buttons[3] = new JButton("State Editor");
		//buttons[4] = new JButton("Cell Editor");
		//buttons[5] = new JButton("Cell Picker");
		//buttons[6] = new JButton("Selection Tools");
		//buttons[7] = new JButton("Brushes");
		//buttons[8] = new JButton("About");
		checks[0] = new Checkbox("Boredom(1)");
		checks[1] = new Checkbox("Boredom(2)");
		checks[2] = new Checkbox("Compass Chaos");
		throttle = new JSlider(0,1000);
		rtsetter[0] = new JSlider(1,1024);
		rtsetter[1] = new JSlider(1,1024);
		rtsetter[2] = new JSlider(1,1024);
		rtslab[0] = new JLabel("50");
		rtslab[1] = new JLabel("50");
		rtslab[2] = new JLabel("50");
		//dispbox = new controlBox(1);
		wrapbox = new controlBox(2);
		cidButton = new JButton("Cell info");
		winitem[0] = new JMenuItem("State Editor");
		winitem[1] = new JMenuItem("Cell Editor");
		winitem[2] = new JMenuItem("Cell Picker");
		winitem[3] = new JMenuItem("Selection Tools");
		winitem[4] = new JMenuItem("Brushes");
		winitem[5] = new JMenuItem("Cell Info");
		winitem[6] = new JMenuItem("About");
		winmen = new JMenu("Window");
		disitem[0] = new JMenuItem("Classic");
		disitem[1] = new JMenuItem("Multicolor");
		disitem[2] = new JMenuItem("State Edit");
		disitem[3] = new JMenuItem("Cell Edit");
		disitem[4] = new JMenuItem("Gradient");
		dismen = new JMenu("Display");
		mainbar = new JMenuBar();
		magsetter = new JSlider(1,30);
		maglab = new JLabel("Magnification");
		magvallab = new JLabel("5");
		
		//setPreferredSize(new Dimension(675,165));
		
		// set layout
		GroupLayout mclayout = new GroupLayout(this);
		mclayout.setAutoCreateGaps(false);
		mclayout.setAutoCreateContainerGaps(false);
		
		mclayout.setHorizontalGroup(
			mclayout.createParallelGroup(GroupLayout.Alignment.LEADING)
			.addComponent(mainbar)
			.addGroup(mclayout.createSequentialGroup()
				.addComponent(buttons[0])
				.addComponent(buttons[1])
				.addComponent(throttle)
				.addComponent(buttons[2])
				.addComponent(cidButton))
			/*.addGroup(mclayout.createSequentialGroup()
				.addComponent(buttons[3])
				.addComponent(buttons[4])
				.addComponent(buttons[5])
				.addComponent(buttons[6])
				.addComponent(buttons[7]))*/
			.addGroup(mclayout.createSequentialGroup()
				//.addComponent(buttons[8])
				//.addComponent(dispbox)
				.addComponent(wrapbox)
				.addComponent(maglab)
				.addComponent(magsetter)
				.addComponent(magvallab))
			.addGroup(mclayout.createSequentialGroup()
				.addComponent(checks[0])
				.addComponent(rtsetter[0])
				.addComponent(rtslab[0]))
			.addGroup(mclayout.createSequentialGroup()
				.addComponent(checks[1])
				.addComponent(rtsetter[1])
				.addComponent(rtslab[1])
				.addComponent(checks[2])
				.addComponent(rtsetter[2])
				.addComponent(rtslab[2]))
				);
				
		mclayout.setVerticalGroup(
			mclayout.createSequentialGroup()
			.addComponent(mainbar)
			.addGroup(mclayout.createParallelGroup()
				.addComponent(buttons[0])
				.addComponent(buttons[1])
				.addComponent(throttle)
				.addComponent(buttons[2])
				.addComponent(cidButton))
			/*.addGroup(mclayout.createParallelGroup()
				.addComponent(buttons[3])
				.addComponent(buttons[4])
				.addComponent(buttons[5])
				.addComponent(buttons[6])
				.addComponent(buttons[7]))*/
			.addGroup(mclayout.createParallelGroup()
				//.addComponent(buttons[8])
				//.addComponent(dispbox)
				.addComponent(wrapbox)
				.addComponent(maglab)
				.addComponent(magsetter)
				.addComponent(magvallab))
			.addGroup(mclayout.createParallelGroup()
				.addComponent(checks[0])
				.addComponent(rtsetter[0])
				.addComponent(rtslab[0]))
			.addGroup(mclayout.createParallelGroup()
				.addComponent(checks[1])
				.addComponent(rtsetter[1])
				.addComponent(rtslab[1])
				.addComponent(checks[2])
				.addComponent(rtsetter[2])
				.addComponent(rtslab[2]))
				);
		setLayout( mclayout );
		
		// setup controls
		//buttons
		for( int c = 0; c < buttons.length; c++){
			if(c == 2){ throttle.addChangeListener(this);throttle.setMaximumSize(new Dimension(100,15));
			}
			 buttons[c].addActionListener(this);
		}
	//checkboxes	
	for(int a = 0; a < checks.length; a++){	
	 checks[a].addItemListener(this);checks[a].setMaximumSize(new Dimension(100,50));
	 rtsetter[a].addChangeListener(this); rtsetter[a].setMaximumSize(new Dimension(100,15));
	 rtslab[a].setText(Integer.toString(rtsetter[a].getValue()));
		}
		
	//Misc	
    rtslab[1].setText(Integer.toString(rtsetter[2].getValue()*2));
	// dispbox.adducListener(this);
	 wrapbox.adducListener(this); wrapbox.setMaximumSize(new Dimension(100,50));
	 cidButton.addActionListener(this);
	 magsetter.addChangeListener(this); magsetter.setValue(5);
		
	// menu bar
	for(int s = 0; s < winitem.length; s++){
		winmen.add(winitem[s]); winitem[s].addActionListener(this);}
	
		dismen.add(disitem[0]); disitem[0].addActionListener(this);
		dismen.add(disitem[1]); disitem[1].addActionListener(this);
		dismen.add(disitem[4]); disitem[4].addActionListener(this);
		dismen.add(disitem[2]); disitem[2].addActionListener(this);
		dismen.add(disitem[3]); disitem[3].addActionListener(this);
	
	mainbar.add(winmen);
	mainbar.add(dismen);
		}