private GridLayout determineLayout(ArrayList<GridElement> in){
		GridLayout gl = new GridLayout();
		
		if(this.getWidth() > 0){
			int numCols = this.getWidth() / (elementWidth + 5); 
			
			gl.setColumns(numCols);
			
			int numRows;
			if(numCols > 0){
				numRows = (in.size() / numCols) + 1;
			}
			else{
				numRows = 0;
			}
			
			gl.setRows(numRows);
			System.out.println("cols " + numCols + " " + numRows);
		}
		
		return gl;
	}