public FilesBrowser(GradingPanels gradingPanes) {
		super();
		this.grading = gradingPanes;
		currentFiles = new ArrayList<SmartFile>();
		selectedFiles = new ArrayList<SmartFile>();
		addListSelectionListener(new ListSelectionListener() {
			public void valueChanged(ListSelectionEvent e) {
				selectedFiles = new ArrayList<SmartFile>(getSelectedValuesList());
			}
		});

		addListSelectionListener(new ListSelectionListener() {
			@Override
			public void valueChanged(ListSelectionEvent arg0) {
				SmartFile firstReadable = null;
				for (SmartFile cur : selectedFiles) {
					if (cur.isReadable()) {
						firstReadable = cur;
						break;
					}
				}
				if (firstReadable != null) {
					JTextPane text = null;
					if (firstReadable.isJavaFile()) {
						JavaSmartFile file;
						try {
							file = new JavaSmartFile(firstReadable);
							text = CodeTextPane.getJavaTextPane(file);
						} catch (IOException e) {
							e.printStackTrace();
						}
					} else {
						text = new JTextPane();
						text.setEditable(false);
						text.setText(firstReadable.read());
					}
					if (text != null)
						grading.setCurrentDisplayTab(new JScrollPane(text));
				}
			}
		});
	}