All pastes #2108331 Raw Edit

Unnamed

public java v1 · immutable
#2108331 ·published 2012-01-31 22:31 UTC
rendered paste body
    private void addStaffProfile() throws NullInputException {        StaffProfile tempStaffProfile = new StaffProfile();        tempStaffProfile.setExperience((StaffExperienceType)comboExperience.getSelectedItem());                  if(txtLongQueueSize.getText().length() == 0){        	throw new NullInputException();        }        if(txtNormalServeSpeed.getText().length() == 0){        	throw new NullInputException();        }        if(txtImprovedServeSpeed.getText().length() == 0){        	throw new NullInputException();        }                    try{        tempStaffProfile.setLongQueueSize(Integer.parseInt(txtLongQueueSize.getText()));        tempStaffProfile.setNormalServeSpeed(Float.parseFloat(txtNormalServeSpeed.getText()));        tempStaffProfile.setImprovedServeSpeed(Float.parseFloat(txtImprovedServeSpeed.getText()));                }        catch(NullInputException e){        	JOptionPane.showMessageDialog(null, "Nothing has been entered", "look!",JOptionPane.ERROR_MESSAGE);        }                        this.staffTableModel.addStaffProfile(tempStaffProfile);      }