java - Add character to trigger JTextPane line wrapping -


i have jtextpane can display text containing nomenclature long strings of characters, numbers , dashes ("-"). have word wrapping turned on but, appears work on white space (" ", tab, etc). i'd add dash character trippers line wrap. tried adding space or tab character after each dash trigger wrap but, not non-wrapped portions. has been able trigger line wrap in jtextpane on character default ones?

well found "hack solution" works but, not 1 prefer. used replaceall add "\r" character after each dash character. caveat; work in java 7 under windows 7 approach might not apply other os's or future java versions. can't endorse approach general solution question working me. addition of "\r" not show in un-wrapped text trigger wrapping other white space. text.replaceall("-","-\r");


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -