import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.lang.*;  


class ControlPanel extends Panel implements ItemListener{
	Antenna ant;
	SlidePanel slidepanel;
	OutPanel outputpanel;
	public Checkbox c1, c2;
	
	CheckboxGroup cgrid1;

	public ControlPanel (Antenna ant){
		super();
		this.ant = ant;
		//setLayout(new GridLayout(2,2));
		setLayout(null);
		    
		cgrid1=new CheckboxGroup();
		
		c1 = new Checkbox("Select Inputs",cgrid1,true);
		
		c2 = new Checkbox("Display Outputs",cgrid1,false);
		
		c1.addItemListener(this);
		c2.addItemListener(this);
		add(c1);
		add(c2);
		
		c1.setBounds(10,5,100,15);
		c2.setBounds(120,5,100,15);
		
	}
	
	public void itemStateChanged(ItemEvent evt){
	    if(evt.getSource()==c1){
		slidepanel.setVisible(true);
		outputpanel.setVisible(false);
		slidepanel.repaint();
	    }	
	    else if(evt.getSource()==c2){
		slidepanel.setVisible(false);
		outputpanel.setVisible(true);
		outputpanel.repaint();
	    }
	}
}
