return;
}
//Create new vehicle type
if (currentVehicleType == null) {
currentVehicleType = new VehicleType(txtName.getText(), Float.parseFloat(txtAcceleration.getText()), Float.parseFloat(txtDeceleration.getText()), Float.parseFloat(txtDriverImperfection.getText()), Integer.parseInt(txtLength.getText()), Integer.parseInt(txtMaximumSpeed.getText()));
}
//Modify editing vehicle type
else {
currentVehicleType.setName(txtName.getText());
currentVehicleType.setAcceleration(Float.parseFloat(txtAcceleration.getText()));