public GUI(String title, Connection aDB, Statement aStatement, ArrayList<Students> students, ArrayList<GPA> gpa, ArrayList<Departments> departments, 
			   ArrayList<Programs> programs, ArrayList<Courses> courses, ArrayList<Section> section, ArrayList<Semester> semester, ArrayList<Professor> professors,
			   ArrayList<Research> research)
	{
		super(title);
		databaseConnection = aDB;
		stat = aStatement;

       
	    this.students = students;
	    this.gpa = gpa;
	    this.departments = departments;
	    this.programs = programs;
	    this.courses = courses;
	    this.section = section;
	    this.semester = semester;
	    this.professors = professors;
	    this.research = research;
	    
        
        
        selectedStudent = null;        
        selectedGPA = null;
        selectedDepartments = null;
        selectedPrograms = null;
        selectedCourses = null;
        selectedSemester = null;
        selectedProfessor = null;
        selectedResearch = null;
        
        
		thisFrame = this;
		
		addWindowListener(
				new WindowAdapter() {
	 				public void windowClosing(WindowEvent e) {
	 					try {
	 						System.out.println("Closing Database Connection");
							databaseConnection.close();
						} catch (SQLException e1) {
							// TODO Auto-generated catch block
							e1.printStackTrace();
						}
						System.exit(0);
					}
				}
			);



		// Make the main window view panel
		add(view = new ListPanel());

		// Add a listener for the add button
		theSearchButtonListener = new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				search();
			}};


			studentsListSelectionListener = new ListSelectionListener() {
				public void valueChanged(ListSelectionEvent event) {
					selectStudent();
				}};
				
            gpaListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectGPA();
    			}};
    			
            departmentsListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectDepartments();
    			}};
    			
            programsListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectPrograms();
    			}};
    			
            coursesListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectCourses();
    			}};
            sectionListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectSection();
    			}};
            semesterListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectSemester();
    			}};
            professorListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectProfessors();
    			}};
            researchListSelectionListener = new ListSelectionListener() {
    			public void valueChanged(ListSelectionEvent event) {
    				selectResearch();
    			}};


    			/*
		// Add a listener to allow double click selections from the list for editing
				doubleClickSongListListener = new MouseAdapter() {
			public void mouseClicked(MouseEvent event) {
				if (event.getClickCount() == 2) {
					JList theList = (JList) event.getSource();
					int index = theList.locationToIndex(event.getPoint());
					songBeingEdited = (FakeBookSong) theList.getModel().getElementAt(index);
					System.out.println("Double Click on: " + songBeingEdited);
					
					
					SongDetailsDialog dialog = new SongDetailsDialog(thisFrame, thisFrame, "Song Details Dialog", true, songBeingEdited);         
					dialog.setVisible(true);

				} 
					
			}};*/
			
		keyListener = new KeyListener() {

				@Override
				public void keyPressed(KeyEvent arg0) {
						
				}

				@Override
				public void keyReleased(KeyEvent arg0) {
					
				}

				@Override
				public void keyTyped(KeyEvent arg0) {

					int keyChar = arg0.getKeyChar();

			        if (keyChar == KeyEvent.VK_ENTER)  search();
				
				}};


        setDefaultCloseOperation(EXIT_ON_CLOSE);
		setSize(600,300);

		// Start off with everything updated properly to reflect the model state
		update();
	}