import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class vcrJPanel extends JPanel 
{
	vcrJPanel1 mjp1;
	vcrJPanel2 mjp2;
	
	public vcrJPanel(obstacle inputObstacle, track inputTrack, car inputCar)
	{
		
		mjp1 = new vcrJPanel1(inputObstacle, inputTrack, inputCar);
		mjp2 = new vcrJPanel2(inputObstacle, inputTrack, inputCar);
		
		this.setLayout(null);
		mjp1.setBounds(0,0,600,600);
		mjp2.setBounds(600,0,200,600);
		add(mjp1);
		add(mjp2);
		
		//This is Basic layout, used when they are the same size
		/*
		setLayout(new GridLayout(1,2,0,0));
		add(mjp1);
		add(mjp2);
		*/
		
		//This is the complex layout
		/*
		GridBagLayout gb = new GridBagLayout();
		GridBagConstraints c = new GridBagConstraints();

		setLayout(gb);

		c.fill = GridBagConstraints.BOTH; 

		c.gridx = 0;
		c.gridy = 0;
		c.weighty = 1;      
		c.weightx = 600;      
		gb.setConstraints(mjp1, c); 

		c.gridx = 1;
		c.gridy = 0;
		c.weighty = 1;      
		c.weightx = 200;      
		gb.setConstraints(mjp2, c);

		add(mjp1);
		add(mjp2);
		*/
		
	}
	

}