private void addBookOnClick(){
		
		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 the bookcopy exists.
		if(!LibraryDB.getManager().hasBookCopy(callNumber, copyNo)){
			popMsg("Book does not exist in library!");
			return;
		}
		
		// Check if the bookcopy was put onto the list already
		for (int i=0;i<copyNos.size();i++){
			if ((copyNos.get(i) == copyNo) && callNumbers.get(i).matches(callNumber)){
				popMsg("BookCopy already added to list");
				return;
			}			
		}
		
		// check if bookcopy is available for borrowing, i.e. status = in.
		if (LibraryDB.getManager().isBookCopyStatus(callNumber,copyNo,BookCopy.OUT)){
			popMsg("Sorry! This book is not available for borrowing.");
			return;
		}
		
		if (LibraryDB.getManager().isBookCopyStatus(callNumber,copyNo,BookCopy.ON_HOLD)){
			if (!isAvailableToBorrower(callNumber)){
				popMsg("Sorry! This book is not available for borrowing.");
				return;
			}
		}
		
		copyNos.add(copyNo);
		callNumbers.add(callNumber);
		textArea.append(callNumber + " " + copyNo + "\n");
		resetTextField();
		System.out.println(callNumbers.size());
	}