public ProductionPanel(int controlPanelHeight, ControlPanel controlPanel, Building building) {
		super();
		this.owner = controlPanel;
		this.setPreferredSize(new Dimension(200, controlPanelHeight));
		this.setBackground(Color.RED);
		GridLayout layout = new GridLayout(size, size);
		layout.setHgap(10);
		layout.setVgap(10);
		setLayout(layout);
		selectedAbility = null;
		this.building = building;
		buttons = new ProductionButton[size * size];
		for(int i = 0; i < size * size; i++) {
			if(i < building.getProductionUnits().size()) {
				buttons[i] = new ProductionButton(building.getProductionUnits().get(i));
				buttons[i].addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						//owner.getMain().getUnits().add(((ProductionButton)e.getSource()).getUnitCopy());
						owner.getMain().getUnits().add(new Collector(200, 200));
					}
				});
				buttons[i].setVisible(true);
			} else {
				buttons[i] = new ProductionButton(null);
				buttons[i].setVisible(false);				
			}
			this.add(buttons[i]);
		}
		cur = 0;
	}