//ChoicePanel.java

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(236,236,236);
	private static final Color tinta = new Color(236,236,236);
	
	//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()); // looks nasty on MAC - MAC sucks!!!!
                
                setLayout(null);
		setBackground(bgcolor);
		Font labelfont=TheFonts.bold12;
		
                lab1=new Label(arg1[0],Label.RIGHT);
		lab1.setFont(labelfont);
		add(lab1);
		//lab1.setBounds(5,10,60,20);
		lab1.setBounds(5,10,65,20);
                
		c1=new Choice();
		for(int i = 1; i < arg1.length; i++){
		    c1.addItem(arg1[i]);
		}
		
		add(c1);
		c1.setFont(TheFonts.sanSerif11);
		// CHANGE ======================================================
                c1.setBackground(Color.white);
                //c1.setBackground(bgcolor);
                //==============================================================
		c1.setForeground(Color.black);
                //c1.setBounds(70,6,220,20);
                c1.setBounds(75,10,220,22);
		
		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(TheFonts.sanSerif11);
		c2.setBackground(Color.white);
		//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
