protected void pushedButton(){
		String id = gui.getDriverID();
		String[] times = Time.makeTimeList();
		if (gui.getDriverID().length() == 0) {
			try {

				String driverID = JOptionPane.showInputDialog(null,
						"Den registrerade tiden är : " + times[0] + "."
								+ times[1] + "." + times[2]
								+ " \n Förarnummer: ");
				if (!driverID.equals(JOptionPane.OK_OPTION)) {
					if(driverID.length() == 0){
						wrongID();
					}else {
					try {
						int idcheck = Integer.parseInt(driverID);
						if (idcheck < 0){
							wrongID();
						}else{
						
							regDriverToFile(driverID, times);

						
						}
					} catch (NumberFormatException e) {
						wrongID();
					}
					
				}}

			} catch (NullPointerException e) {
			}
		} else {
			try {
				int idcheck = Integer.parseInt(id);
				if (idcheck<0){
					wrongID();
				}else{
				if (gui.getDriverID().length() != 0) {
					regDriverToFile(id, times);

				}
				}
			} catch (NumberFormatException e) {
				wrongID();
			}
		}
	}