
import javax.swing.JFrame;

public class GameOfLifeViewer {
  public static void main( String[] args ) {
    final int FRAME_WIDTH = 800;
    final int FRAME_HEIGHT = 600;
    
    JFrame frame = new JFrame();
    frame.setSize( FRAME_WIDTH, FRAME_HEIGHT );
    frame.setTitle( "Game Of Life!" );
    frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    
    
    GameOfLife g = new GameOfLife( FRAME_WIDTH/10, FRAME_HEIGHT/10 );
    g.fillWithRandom( .3 );
    
    GameOfLifeComponent comp 
      = new GameOfLifeComponent( g );
    frame.setContentPane( comp );
    frame.setVisible( true );
    comp.animate();
  }
}