//TargetPanel

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


public class TargetPanel extends PD implements ItemListener{
    private Trans_State state;
    //private static final Color bgcolor = new Color(216,216,191);
    private static final Color tinta = new Color(236,236,236);
    private static final Color bgcolor = new Color(236,236,236);
    protected static final Font titfont = new Font("SanSerif",Font.PLAIN,14);
    //private static final Color bgcolor = new Color(200,200,200);
    
    public TargetPanel(String titulo, String[] nome, String[] unidade, Trans_State state){
	super(titulo,nome,unidade);
	setLayout(null);
	setBackground(bgcolor);
	this.state = state;

        titlelabel.setBounds(15,5,250,20);
        titlelabel.setForeground(Color.red.darker());
        titlelabel.setFont(titfont);
        
	lab1[0].setBounds(20,40,60,12);
	text1[0].setBounds(85,35,80,20);
	
	lab2[0].setBounds(145,50,20,20);
	
	b1.setBounds(185,35,70,20);
        b1.setBackground(bgcolor);	
	text1[0].setText(""+state.targetVSWR);
	
	//Listeners
	
    }
    
    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);
	    
	    g.setColor(Color.black);	
	      
	    g.setColor(Color.red.darker());
            g.drawRect(82,32,84,24);
            g.drawRect(182,32,74,24);
            
    }
    
    public void itemStateChanged(ItemEvent evt){
	
    }

}

