public CompanyEmployeeRelationship() {
		super(null);
		relationshipData = new String[2];
		relationshiptxt = "fieldPlacement.txt";
		
		model = new RelationshipTableModel();
		fieldTable = new JTable(model);
		fieldTable.setPreferredScrollableViewportSize(new Dimension(500, 70));
		sorter = new TableRowSorter<RelationshipTableModel>(model);
		fieldTable.setRowSorter(sorter);
		fieldTable.setFillsViewportHeight(true);
		fieldTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		
	     chooseFilter = new JComboBox(filterLabels);
	     filterText = new JTextField();
	     //Whenever filterText changes, invoke newFilter.
	     filterText.getDocument().addDocumentListener(
	                new DocumentListener() {
	                    public void changedUpdate(DocumentEvent e) {
	                        System.out.println("Works");
	                        newFilter();
	                    }
						public void insertUpdate(DocumentEvent e) {
	                        System.out.println("Works2");
	                        newFilter();
	                    }
	                    public void removeUpdate(DocumentEvent e) {
	                        System.out.println("Works3");

	                        newFilter();
	                    }
	                });       
		
		// Initializes the JLabels and declares the foreground color as allColor
		employeeLabel = new JLabel("Enter the Employee's ID : ");
		employeeLabel.setForeground(allColor);
		employeeLabel.setFont(new Font("Sans Serif",Font.BOLD, fontSize));
		employerLabel = new JLabel("Enter the Company's ID : ");
		employerLabel.setForeground(allColor);
		employerLabel.setFont(new Font("Sans Serif",Font.BOLD, fontSize));
		employeeName = new JLabel("");
		employeeName.setForeground(allColor);
		employeeName.setFont(new Font("Sans Serif",Font.PLAIN, fontSize));
		employerName = new JLabel("");
		employerName.setForeground(allColor);
		employerName.setFont(new Font("Sans Serif",Font.PLAIN, fontSize));
		
		// Looks for images in the database and uses them
		try {
			logo = ImageIO.read(new File("MMT_Logo.png"));
		} catch (IOException e) {
			e.printStackTrace();
		}
		try{
			background = ImageIO.read(new File("DAPP_Background2.jpg"));
		}catch(IOException e) {
			e.printStackTrace();
		}
		// Declares the text fields
		employeeField = new JTextField();
		employeeField.getDocument().addDocumentListener(
				new DocumentListener() {
					public void changedUpdate(DocumentEvent e) {
						checkEmployeeID();
					}
					public void insertUpdate(DocumentEvent e) {
						checkEmployeeID();
					}
                    public void removeUpdate(DocumentEvent e) {
                    	checkEmployeeID();
                    }
				});
		employerField = new JTextField();
		employerField.getDocument().addDocumentListener(
				new DocumentListener() {
					public void changedUpdate(DocumentEvent e) {
						checkEmployerID();
					}
					public void insertUpdate(DocumentEvent e) {
						checkEmployerID();
					}
                    public void removeUpdate(DocumentEvent e) {
                    	checkEmployerID();
                    }
				});
		
		// JButtons to employ (place in fields) or to cancel (restarts form)
		employ = new JButton("Employ");
		employ.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent a) {
				if(checkTextFields()) {
					getText();
					clearTextFields();
					enterToFile();				
					model.changeData();
					model.fireTableDataChanged();
					JOptionPane.showMessageDialog(null, "Your field placement has been submitted");
				}
			}
		});
		
		cancel = new JButton("Cancel");
		cancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent a) {
				clearTextFields();
			}
		});
		
		
		// Adding all the fields and labels to the panel
		this.add(employeeLabel);
		this.add(employeeField);
		this.add(employeeName);
		this.add(employerLabel);
		this.add(employerField);
		this.add(employerName);
		this.add(cancel);
		this.add(employ);
		
		employeeLabel.setBounds(50, 150, 200, 20);
		employeeField.setBounds(260, 150, 250, 20);
		employeeName.setBounds(260, 100, 200, 40);
		TitledBorder employeeBorder = new TitledBorder("Employee Name");
		employeeBorder.setTitleColor(allColor);
		employeeName.setBorder(employeeBorder);
		employerName.setBounds(260, 240, 200, 40);
		TitledBorder employerBorder = new TitledBorder("Employer Name");
		employerBorder.setTitleColor(allColor);
		employerName.setBorder(employerBorder);
		employerLabel.setBounds(50, 300, 200, 20);
		employerField.setBounds(260, 300, 250, 20);
		cancel.setBounds(50, 400, 70, 20);
		employ.setBounds(150, 400, 70, 20);
		this.add(chooseFilter);
	    chooseFilter.setBounds(tableX, 590, 150, 20);
	        
	    this.add(filterText);
	    filterText.setBounds(tableX + 170, 590, 300, 20);
		tablePane = new JScrollPane(fieldTable);
		this.add(tablePane);
        tablePane.setBounds(tableX, tableY, 500, 500);
	}