public CourseListFrame(CourseModel model, Settings settings) {
		super("Courses", model);
		model.addListener(this);

		Dimension dim = new Dimension(400, 200);
		this.setMinimumSize(dim);
		this.setSize(dim);

		final CourseTableModel tableModel = new CourseTableModel();
		table = new JTable(tableModel);
		table.setAutoCreateRowSorter(true);
		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		table.setDefaultRenderer(Status.class, new StatusCellRenderer(settings));
		this.cellEditor = new DefaultCellEditor(new StatusComboBox(
				Status.getAll(), settings));
		this.setLayout(new BorderLayout());
		this.add(new JScrollPane(table), BorderLayout.CENTER);
		this.add(searchField, BorderLayout.SOUTH);

		table.getSelectionModel().addListSelectionListener(
				new ListSelectionListener() {
					@Override
					public void valueChanged(ListSelectionEvent e) {
						if (e.getValueIsAdjusting())
							return;
						CourseRec selection = null;
						if (table.getSelectedRow() >= 0)
							// Assume column -1 return the whole object
							selection = (CourseRec) tableModel.getValueAt(table
									.convertRowIndexToModel(table
											.getSelectedRow()), -1);
						for (CourseSelectionListener lnr : courseListeners)
							lnr.courseSelected(selection);
					}
				});
		searchField.getDocument().addDocumentListener(new DocumentListener() {
			@Override
			public void insertUpdate(DocumentEvent e) {
				searchByName(searchField.getText());
			}

			@Override
			public void removeUpdate(DocumentEvent e) {
				searchByName(searchField.getText());
			}

			@Override
			public void changedUpdate(DocumentEvent e) {
				// Paranoia.
				throw new RuntimeException(
						"Plain text components do not fire these events");
			}
		});
		searchField.addKeyListener(new KeyAdapter() {
			@Override
			public void keyPressed(KeyEvent e) {
				int c = e.getKeyCode();
				if (c == KeyEvent.VK_ESCAPE) {
					e.consume();
					searchField.setText("");
				}
				if (c == KeyEvent.VK_DOWN) {
					e.consume();
					searchFromIdx++;
					searchByName(searchField.getText());
				}
			}
		});
		setColumnWidth();
	}