private void onClick() {
		String newStatus;
		String callNumber = textFields.get(0).getText().trim();
		int copyNo;
		if (!isNumeric(textFields.get(1).getText().trim())){
			popMsg("copyNo must be a number!");
			return;
		}
		copyNo = Integer.parseInt(textFields.get(1).getText().trim());

		// check if book exists
		if(!LibraryDB.getManager().hasBookCopy(callNumber, copyNo)){
			popMsg("Book does not exist in library!");
			return;
		}

		// check if bookcopy is available for borrowing, i.e. status = out.
		if (!LibraryDB.getManager().isBookCopyStatus(callNumber,copyNo,BookCopy.OUT)){
			popMsg("Sorry! This book is not out, please double check call number and copyNo.");
			return;
		}

		// Message to be shown later
		String msg = "Item Returned! \n";
		
		//Retrieve Borrowing
		Borrowing b = LibraryDB.getManager().getBorrowing(callNumber, copyNo);

		// set inDate
		Calendar currentCal = new GregorianCalendar(TimeZone.getTimeZone("PST"));
		String currentDate = calendarToString(currentCal);
		LibraryDB.getManager().updateBorrowingInDate(b.getBorid(), currentDate);
		
		//Check Overdue and create a new Fine if it is.
		if (getOverDueTime(b) > 0) {
			Fine f = new Fine(0,getOverDueTime(b),currentDate,null,b.getBorid());
			LibraryDB.getManager().insertFine(f);
			msg += "Fine is assessed. \n";
		}

		// Check if on-hold
		newStatus = getNewStatus(callNumber);

		if (newStatus.matches(BookCopy.ON_HOLD)){
			msg += "Book is placed on-hold. \n";
		}
		LibraryDB.getManager().updateBookCopy(callNumber, copyNo, newStatus);
		
		popMsg(msg);
		this.dispose();
	}