Hey, I'm having trouble getting scrolling to work properly with a jtextarea. Any help would be appreciated. What I have is basically:
JTextArea test = new JTextArea();
for (int i = 0; i < 50; ++i) {
test.append(i + "\tstrings!!! \n");
}
test.setPreferredSize(new Dimension(200, 200));
JScrollPane testScroller = new JScrollPane(test);
testScroller.setVerticalScrollBar(new JScrollBar());
testScroller.setPreferredSize(test.getPreferredSize());
mainPanel.add(testScroller);
This doesn't work right, it only lets me scroll the first 13 or so lines, if at all. How can I set it to work right and handle all the lines of text that may appear??
Thanks!
