I'm using a JTextPane inside a JScrollPane - a classical case:
JTextPane textPane = new JTextPane();
JScrollPane = new JScrollPane(textPane);
So, this is how i add these two components on my JFrame.
When i type a lot of text into the JTextPane, a vertical scrollbar appears. However, if i have long lines in the JTextPane, a horizontal scrollbar doesn't appear. The lines get wrapped.
I want the horizontal scrollbar to appear.
I think there must be a line wrap option in the JTextPane attribute sets. However, i didn't succeed at finding them.
Or maybe i should do something with the JScrollPane?
I'd liked to get these few lines of code that solve the problem.
Thanks a lot.