public void GenerateSTM(UOIGUI gui){
		Random rndm = new Random();
		String[] columns = {"StaticMesh","Tag","Layer","bOverrideLightMapRes","OverriddenLightMapRes","bUsePrecomputedShadows",
							"LightingChannels","Location","Rotation","Scale"};
		Object[][] data = new Object[Integer.parseInt(gui.getStmCountField().getText())][columns.length];
		ArrayList<String> lightdata;
		String location = "(";
		String rotation = "(";
		String scale = "(";
		for(int i = 0;i < data.length;i++){
			location = "(";
			rotation = "(";
			scale = "(";
			lightdata = new ArrayList<String>();
			// Meshpath
			if(gui.getStmMeshField().getText() != ""){
				data[i][0] = gui.getStmMeshField().getText();
			}else{
				data[i][0] = null;
			}
			// Mesh-Tag
			if(gui.getStmTagField().getText() != ""){
				data[i][1] = gui.getStmTagField().getText();
			}else{
				data[i][1] = "";
			}
			//Mesh-Layer
			if(gui.getStmLayerField().getText() != ""){
				data[i][2] = gui.getStmLayerField().getText();
			}else{
				data[i][2] = "";
			}
			// Lightmap Override
			if(gui.getChckbxSTMOverride().isSelected()){
				data[i][3] = true;
			}else{
				data[i][3] = false;
			}
			// Lightmap Overriden Resolution
			if(gui.getStmResField().getText() != ""){
				data[i][4] = gui.getStmResField().getText();
			}else{
				data[i][4] = 64; //TODO: Change to Template Standard
			}
			// Use Realtime Lighting
			data[i][5] = gui.getChckbxSTMPrec().isSelected();
			// Lighting Channels Mesh is reacting to
			data[i][6] = gui.getCbSTMChannels(); //TODO: change to array with selected channels
			
			// Location
			if(gui.getChckbxSTMLRange().isSelected()){
				// X
				location += rndm.nextFloat() * (Float.parseFloat(gui.getStmLMaxXField().getText()) - Float.parseFloat(gui.getStmLMinXField().getText())) + Float.parseFloat(gui.getStmLMinXField().getText()) + ",";
				// Y
				location += rndm.nextFloat() * (Float.parseFloat(gui.getStmLMaxYField().getText()) - Float.parseFloat(gui.getStmLMinYField().getText())) + Float.parseFloat(gui.getStmLMinYField().getText()) + ",";
				// Z
				location += rndm.nextFloat() * (Float.parseFloat(gui.getStmLMaxZField().getText()) - Float.parseFloat(gui.getStmLMinZField().getText())) + Float.parseFloat(gui.getStmLMinZField().getText()) + ")";
			}else{
				// X
				location += gui.getStmLMinXField().getText() + ",";
				// Y
				location += gui.getStmLMinYField().getText() + ",";
				// Z
				location += gui.getStmLMinZField().getText() + ")";
			}
			data[i][7] = location;
			
			// Rotation
			if(gui.getChckbxSTMRRange().isSelected()){
				// X
				rotation += rndm.nextFloat() * (Float.parseFloat(gui.getStmRMaxXField().getText()) - Float.parseFloat(gui.getStmRMinXField().getText())) + Float.parseFloat(gui.getStmRMinXField().getText()) + ",";
				// Y
				rotation += rndm.nextFloat() * (Float.parseFloat(gui.getStmRMaxYField().getText()) - Float.parseFloat(gui.getStmRMinYField().getText())) + Float.parseFloat(gui.getStmRMinYField().getText()) + ",";
				rotation += rndm.nextFloat() * (Float.parseFloat(gui.getStmRMaxZField().getText()) - Float.parseFloat(gui.getStmRMinZField().getText())) + Float.parseFloat(gui.getStmRMinZField().getText()) + ")";
			}else{
				// X
				rotation += gui.getStmRMinXField().getText() + ",";
				// Y
				rotation += gui.getStmRMinYField().getText() + ",";
				// Z
				rotation += gui.getStmRMinZField().getText() + ")";					
			}
			data[i][8] = rotation;
			
			// Scale
			if(gui.getChckbxSTMSRange().isSelected()){
				// X
				scale += rndm.nextFloat() * (Float.parseFloat(gui.getStmSMaxXField().getText()) - Float.parseFloat(gui.getStmSMinXField().getText())) + Float.parseFloat(gui.getStmSMinXField().getText()) + ",";
				// Y
				scale += rndm.nextFloat() * (Float.parseFloat(gui.getStmSMaxYField().getText()) - Float.parseFloat(gui.getStmSMinYField().getText())) + Float.parseFloat(gui.getStmSMinYField().getText()) + ",";
				// Z
				scale += rndm.nextFloat() * (Float.parseFloat(gui.getStmSMaxZField().getText()) - Float.parseFloat(gui.getStmSMinZField().getText())) + Float.parseFloat(gui.getStmSMinZField().getText()) + ")";					
			}else{
				// X
				scale += gui.getStmSMinXField().getText() + ",";
				// Y
				scale += gui.getStmSMinYField().getText() + ",";
				// Z
				scale += gui.getStmSMinZField().getText() + ")";
			}
			data[i][9] = scale;
		}
		((DefaultTableModel) gui.getStmTable().getModel()).setDataVector(data, columns); //TODO: Check for replace and append
	}