// sourcePanel.add(new JScrollPane(new SourcePane(reader)), BorderLayout.CENTER);
StringBuilder sb = new StringBuilder();
char[] chars = new char[1024];
for(int i; (i=reader.read(chars)) != -1; sb.append(chars, 0, i)) {
}
JSyntaxHighlighter syntaxHighlighter = new JSyntaxHighlighter();
syntaxHighlighter.setContent(sb.toString(), ContentLanguage.Java);
sourcePanel.add(syntaxHighlighter, BorderLayout.CENTER);
sourcePanel.revalidate();
sourcePanel.repaint();
reader.close();
} catch(Exception ex) {