Reputation: 5427
I'm using (in a JPanel with GridLayout) some JTextAreas (with Editable=false) to show some text after a query to a database XML.
JTextArea obj = new JTextArea();
obj.setColumns(37);
obj.setText(r.getProtocolloList().get(i).getOggetto());
The problem is that this text can be quite long and it is showed all in a single line so that the user has to scroll the horizontal JScrollPane to read the rest. I thought that setting the columns the line would be restricted so that the text would be showed in different lines. But nothing happens. Is there a way to get that? Thanks
Upvotes: 2
Views: 1919