farm ostrich
farm ostrich

Reputation: 5959

How to word wrap text stored in JTextPanes which are cells in a JList

I created a JList that had JTextAreas which word wrapped appropriately when setLineWrap(true); setWrapStyleWord(true); was used. These aren't available for JTextPane and my god forsaken text isn't wrapping. Any advise?

Upvotes: 1

Views: 822

Answers (1)

StanislavL
StanislavL

Reputation: 57381

USe this example to implement your own wrap in JTextPane http://java-sl.com/wrap.html

Upvotes: 2

Related Questions