public void actionPerformed(ActionEvent arg0) {
		// 
		if(arg0.getSource() == okButton){
			// Find out how many master coordinates there are
			int nMasters = 0;
			for (int xx=0 ;  xx<coordinatePanels.length ;  xx++){
				for (int yy=0 ;  yy<coordinatePanels[0].length ;  yy++){
					if (coordinatePanels[xx][yy].isRep){
						nMasters++;
					}
				}
			}
			//populate TablePoints array with masters
			TablePoints[] tabls= new TablePoints[nMasters];
			int i = 0;
			int[] tmpPoint = new int[2];
			for (int xx=0 ;  xx<coordinatePanels.length ;  xx++){
				for (int yy=0 ;  yy<coordinatePanels[0].length ;  yy++){
					if (coordinatePanels[xx][yy].isRep){
						tmpPoint[0]=coordinatePanels[xx][yy].x+1;
						tmpPoint[1]=coordinatePanels[xx][yy].y+1;
						tabls[i]= new TablePoints(tmpPoint);
						i++;
					}
				}
			}
			//int tabls[][] = {{1,1},{3,1},{5,1},{2,3},{4,3},{3,5},{5,7},{9,11}};
			//int spcs[][] = {{0,0},{1,0},{2,0},{3,0},{4,0},{5,0}};
			//
			parent.addTables(tabls);
			this.setVisible(false);
		}
		if(arg0.getSource() == settingsButton){
			parent.cdtimer.timeout = Integer.valueOf(timelimitField.getText());
			parent.cdtimer.reset();
			this.setVisible(false);
			this.dispose();
		}
		if(arg0.getSource() == timelimitField){
			parent.cdtimer.timeout = Integer.valueOf(timelimitField.getText());
		}
	}