import javax.swing.JFrame;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Vector;

public class Simulator extends JPanel {
    /*@non_null@*/ GridDisplay display;
    ///*@non_null@*/ SimObjectChooser simObjChooser;
    /*@non_null@*/ private JButton startButton, stopButton;

    private int width;
    private int height;

    //@requires width > 0
    //@requires height > 0
    public Simulator (int width, int height, /*@non_null@*/ Grid grid) {
	this.width = width;
	this.height = height;

    setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));

	//simObjChooser = new SimObjectChooser ();

	display = new GridDisplay (grid/*, simObjChooser*/);
        display.setPreferredSize (new Dimension (width, height));
        display.setMinimumSize (new Dimension (width, height));
        
        add (display);
}

    public void start() {
      display.startObjects();
    }

}