private int PayFine() { 
		String date = new java.text.SimpleDateFormat("yyyy/MM/dd").format(new java.util.Date());
		int rate = 1;		
		int duration = 0;
		int timeLimit = 0;
		int borid = 0;
		boolean a = false;
		try {
			timeLimit = LibraryDB.getManager().getTimeLimit(bid);
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
		
		ArrayList<Borrowing> borrowings = LibraryDB.getManager().getBorrowingByID(bid);
		for (Borrowing borrowing: borrowings){
			Calendar dueCal = stringToCalendar(borrowing.getOutDate());
			dueCal.add(Calendar.DATE, timeLimit); 
			borid = borrowing.getBorid();

			String issueDate = LibraryDB.getManager().getIssueDate(borid);
			if (issueDate==null) continue;
			Calendar issueCal = stringToCalendar(issueDate);
			int d = (int)( (issueCal.getTimeInMillis() - dueCal.getTimeInMillis()) 
	                / (1000 * 60 * 60 * 24) );
			a = LibraryDB.getManager().updateFine(borid, date, d*rate);
			duration += d;
			
		}
		if (a){
			popMsg("The total fine payment is: " + duration*rate + "cents");
			new CheckAccountHelper(bid);	
			this.dispose();
			
		}
		
		return duration;
		
	}