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


public class ChoicePanel extends Panel{ 
	public Choice c1;
	public Choice c2;
	private  Label lab1, lab2;
	
	private static final Color bgcolor = new Color(216,216,191);
	private static final Color tinta = new Color(236,236,221);
	
	//private static final Color bgcolor = Color.lightGray;
	//private static final Color tinta = new Color(235,235,235);
	
	public ChoicePanel(String arg1[], String arg2[]){
		super();
		setLayout(new FlowLayout());
		setBackground(bgcolor);
		Font labelfont=new Font("SanSerif",Font.BOLD,11);
		lab1=new Label(arg1[0],Label.RIGHT);
		lab1.setFont(labelfont);
		add(lab1);
		
		c1=new Choice();
		for(int i = 1; i < arg1.length; i++){
		    c1.addItem(arg1[i]);
		}
		
		add(c1);
		c1.setFont(new Font("SanSerif",Font.PLAIN,11));
		c1.setBackground(tinta);
		//c1.setBackground(bgcolor.brighter());
		c1.setForeground(Color.black);
		
		lab2=new Label(arg2[0],Label.RIGHT);
		lab2.setFont(labelfont);
		add(lab2);
		c2=new Choice();
		for(int i = 1; i < arg2.length; i++){
		    c2.addItem(arg2[i]);
		}
		add(c2);
		c2.setFont(new Font("SanSerif",Font.PLAIN,11));
		c2.setBackground(tinta);
		//c2.setBackground(bgcolor.brighter());
		c2.setForeground(Color.black);
		
	}
	public void paint(Graphics g){
	    g.clearRect(0,0,getSize().width,getSize().height);
	    g.setColor(bgcolor.darker());
	    g.fillRect(0,getSize().height-2,getSize().width,2);
	    g.fillRect(getSize().width-2,0,2,getSize().height);
	    g.setColor(bgcolor.brighter());
	    g.fillRect(0,0,2,getSize().height-1);
	    g.fillRect(0,0,getSize().width-2,2);
	}
	
} // ChoicePanel.java

/*//RadarControls.java



class RadarControls extends Panel{
	Antenna ant;
	Checkbox c1, c3;
	Button b1;
	
	CheckboxGroup cgrid1, cgrid2;

	public RadarControls (Antenna ant){
		super();
		this.ant = ant;
		setLayout(new GridLayout(2,1));
		
		cgrid1=new CheckboxGroup();
		cgrid2=new CheckboxGroup();
		c1 = new Checkbox("E-H Field",cgrid1,true);
		//c2 = new Checkbox("H-Field",cgrid1,false);
		c3 = new Checkbox("Power",cgrid1,false);
		//b1 = new Button("About");
		
		add(c1);
		add(c3);
		//add(c2);
		//add(b1);


		
	
	}
	public boolean action(Event evt, Object obj){
		if(evt.target instanceof Checkbox){
			if(c1.getState()==true){
				ant.rcan1.repaint(1);
				ant.rcan2.repaint(1);
				return true;
			
			else if(c3.getState()==true){
				ant.rcan1.repaint(3);
				ant.rcan2.repaint(3);
				return true;
			}	
		}
		/*else if(evt.target instanceof Button){
	 		 if("About".equals(obj)){
				AboutDialog ab = new AboutDialog();
				ab.show();
			}
			return true;
		}
		return false;
	}
}
*/
