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

public class EquivalentOn extends Panel{
    //private static final Color bgcolor = Color.lightGray;
    private static final Color bgcolor = Color.white;
    public Checkbox Equivalent;
    private Image im;
    private Graphics buf;
        
    public EquivalentOn(){
	super();
        setLayout(null);
	setBackground(bgcolor);
        
        Equivalent = new Checkbox("",null,false);
        add(Equivalent);
	Equivalent.setBackground(bgcolor);
        Equivalent.setForeground(Color.red);
        
        Equivalent.setBounds(35,2,15,20);    
    }
    
    public void paint(Graphics g){
	    if(im == null){
		im = createImage(getSize().width,getSize().height);
		buf = im.getGraphics();
		drawGraph(buf);
	    }
	    else{
		drawGraph(buf);
	    }
	    g.drawImage(im,0,0,null);
    }
	
	//Addition to reduce flicker new routine
    public void update(Graphics g){		// added to avoid clearing
	    paint(g);
    }
    
    public void drawGraph(Graphics g){
	g.setColor(bgcolor);	
	g.fillRect(0,0,getSize().width-1,getSize().height-1);  
        
        Graphics2D g2d = (Graphics2D)g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
        
        g.setColor(Color.black);
        MaestroG.subscripterSansItalic5("Equivalent  ","J","0","",g,16,55,16);
                           
    }
}