/*
 * Created on Nov 27, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package jone;
import java.applet.Applet;
//import java.awt.Graphics;

import java.awt.*;
import javax.swing.*;
import java.awt.geom.Rectangle2D;
import java.util.Random;
/**
 * @author brian
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ArenaPanel extends JPanel {

	private int width = 400;
	private int height = 400;
	private int xStart= 15;
	private int yStart = 35;
	
	private static ArenaPanel defaultInstance;
	public static ArenaPanel getInstance()
	{
		if(defaultInstance == null)
			defaultInstance = new ArenaPanel();
		return defaultInstance;
	}
	public void paint(Graphics g)
    {
    	super.paint(g);
    	Graphics2D g2d = (Graphics2D) g;
    	//Rectangle2D.Double rect = new Rectangle.Double(1,1,100,20);
		//g2d.setPaint(Paint.);
    	//g2d.draw(rect);
    	//Random random = new Random();
    	//g2d.drawChars(new char[] {'S'},0,1,15+300,15+180);
    	//g2d.drawChars(new char[] {'S'},0,1,15+100,15+180);
    }
	public void clearArea(Graphics g)
	{
		//clear and redraw the border
		if(g != null) {
			g.clearRect(2,2,width()-4,height()-3);
		}
		//g.clearRect(1,1,1,1);
		//g.drawRect(0,0,width-1,height-1);
	}
	public int width() 
	{
		return width;
	}
	public int height()
	{
		return height;
	}
	public int startX()
	{
		return xStart;
	}
	public int startY()
	{
		return yStart;
	}
}
