问题
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?
回答1:
USe this example to implement your own wrap in JTextPane http://java-sl.com/wrap.html
来源:https://stackoverflow.com/questions/6866627/how-to-word-wrap-text-stored-in-jtextpanes-which-are-cells-in-a-jlist