textArea = new JSyntaxTextArea(15, 50, true);
textArea.setEditable(false);
textArea.setLineWrap(false);
textArea.setLanguage("text");
textArea.setMargin(new Insets(2, 2, 2, 2)); // space between borders and text
JScrollPane areaScrollPane = new JTextScrollPane(textArea);
areaScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
areaScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
this.add(areaScrollPane, BorderLayout.CENTER);
}