public StaffListGUI() {
		//Get size of screen without taskbar
				screenSize = Toolkit.getDefaultToolkit().getScreenSize();
				screenMax = Toolkit.getDefaultToolkit().getScreenInsets(bookDialog.getGraphicsConfiguration());
				taskbarSize = screenMax.bottom;
				screenWidth = (int)screenSize.getWidth();
				screenHeight = (int)screenSize.getHeight() - taskbarSize;
				
				//Fill container
				contentPane.setLayout(bookLayout);
				contentPane.add(backButton);
				contentPane.add(addButton);
				contentPane.add(deleteButton);
				contentPane.add(editButton);
				contentPane.add(listScrollPane);
				contentPane.add(searchLabel);
				contentPane.add(searchField);
				contentPane.add(bookBox);
				
				
				//Prepare frame components
				listField.setEditable(false);
				listField.setSelectionColor(selectionColor);
				searchField.setColumns(20);
				
				//Placement of components on screen
				bookLayout.putConstraint(SpringLayout.WEST, backButton, (int)(screenWidth * 0.01), SpringLayout.WEST, contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, backButton, (int)(screenHeight * 0.01), SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, listScrollPane, (int)(screenWidth * 0.35), SpringLayout.WEST, contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, listScrollPane, (int)(screenHeight * 0.3703), SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, addButton, (int)(screenWidth * 0.7), SpringLayout.WEST, contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, addButton, (int)(screenHeight * 0.41), SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, deleteButton, (int)(screenWidth * 0.7), SpringLayout.WEST, contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, deleteButton, (int)(screenHeight * 0.46), SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, editButton, (int)(screenWidth * 0.7), SpringLayout.WEST, contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, editButton, (int)(screenHeight * 0.51), SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, searchLabel, (int)(screenWidth * 0.42), SpringLayout.WEST,contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, searchLabel, (int)(screenHeight * 0.33) , SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, searchField, (int)(screenWidth * 0.45), SpringLayout.WEST,contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, searchField, (int)(screenHeight * 0.33) , SpringLayout.NORTH, contentPane);
				
				bookLayout.putConstraint(SpringLayout.WEST, bookBox, (int)(screenWidth * 0.6), SpringLayout.WEST,contentPane);
				bookLayout.putConstraint(SpringLayout.NORTH, bookBox, (int)(screenHeight * 0.33) , SpringLayout.NORTH, contentPane);
				
				backButton.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent event) {
						MainGUI.switchToMenu();
					}
					
				});
				
				listField.addMouseListener(new MouseAdapter() {

					@Override
					public void mouseClicked(MouseEvent e) {
						
						try {
							int offset = listField.viewToModel(e.getPoint());
							int rowStart = Utilities.getRowStart(listField, offset);
							int rowEnd = Utilities.getRowEnd(listField, offset);
							listField.setSelectionStart(rowStart);
							listField.setSelectionEnd(rowEnd);
							selectedLine = listField.getText().substring(rowStart, rowEnd);
							int end = selectedLine.indexOf("|", 5);
							selectedLine = selectedLine.substring(5, end - 1);
							selectionMade = true;
							System.out.println(selectedLine);
						} catch (BadLocationException e1) {
							// TODO Auto-generated catch block
							e1.printStackTrace();
						}
						
					}
					
				});
				
				addButton.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent e) {
						MainGUI.switchToStaff();
						forEdit = true;
					}
					
				});
				
				editButton.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent e) {
						MainGUI.switchToStaff(true);
						Staff staff = StaffDAO.getStaffByID(selectedLine);
						IDField.setText(staff.getLogin().getStaffID());
						passwordField.setText(staff.getLogin().getPassword());
						nameField.setText(staff.getName());
						a = staff.getFunction();
						firstNameField.setText(staff.getSurname());
						StaffGUI.this.staffButton.setText("Save");
						passwordChanged = false;
						
					}
					
				});
				
				deleteButton.addActionListener(new ActionListener() {

					@Override
					public void actionPerformed(ActionEvent e) {
						if(selectionMade == true) {
							StaffDAO.removeStaff(selectedLine);
							selectionMade = false;
							
							//Update list
							reset();
							update();
						}
						
					}
					
				});
				searchField.addActionListener(new ActionListener(){

					@Override
					public void actionPerformed(ActionEvent e) {
						reset();
						String text = searchField.getText();
						if(a==" ID")
						{
							if(listField.getText().equals("")){
								staffList = StaffDAO.searchStaffByID(text);
								for(Staff s : staffList) {
									Login login = s.getLogin();
									staffResults += " ID: " + login.getStaffID() + " || Surname: " + s.getSurname() + " || Name: " + s.getName()
											+ " || Function: " + s.getFunction() + System.lineSeparator();
								}
								listField.setText(staffResults);
							}
						}
													
					}
					});
				
		}