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

							@Override
							public void actionPerformed(ActionEvent arg0) {
								MainGUI.switchToRate();
							}

						});
						
						editButton.addActionListener(new ActionListener() {

							@Override
							public void actionPerformed(ActionEvent arg0) {
								MainGUI.switchToRate(true);
								r = RateDAO.getRateByID(Integer.valueOf(selectedLine));
								
								rateDescriptionField.setText(r.getDescription());
								ratePriceField.setText(String.valueOf(r.getRate()));
								
								if(Integer.valueOf(selectedLine) < 6){
									rateDescriptionField.setEditable(false);
								}
								
								RateGUI.this.rateButton.setText("update");
							}
							
						});
						
						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;
									if(Integer.valueOf(selectedLine) < 6){
										deleteButton.setEnabled(false);
									}else{
										deleteButton.setEnabled(true);
									}
									System.out.println(selectedLine);
								} catch (BadLocationException e1) {
									// TODO Auto-generated catch block
									e1.printStackTrace();
								}
								
							}
							
						});
						
						deleteButton.addActionListener(new ActionListener() {

							@Override
							public void actionPerformed(ActionEvent e) {
								if(selectionMade == true) {
									Rate selectedRate = null;
									for(Rate r : rateList) {
										if(r.getRateId() == Integer.valueOf(selectedLine)) {
											selectedRate = r;
										}
									}
									if(activeUser == activeManager){
										activeManager.removeRate(selectedRate.getRateId());
									}else{
										activeAdmin.removeRate(selectedRate.getRateId());
									}
									selectionMade = false;
									
									reset();
									update();
								}
								
							}
							
						});
				}