Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.alt.net!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Larry Barowski" Subject: Re: JTextPane line wrap c Message-ID: X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1173891853.202753.216660@e1g2000hsg.googlegroups.com> References: <1173891853.202753.216660@e1g2000hsg.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 31 Date: Wed, 27 Apr 2011 15:31:48 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918308 96.60.20.240 (Wed, 27 Apr 2011 10:31:48 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:31:48 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1178 To: comp.lang.java.gui wrote in message news:1173891853.202753.216660@e1g2000hsg.googlegroups.com... > For several years, I've been displaying marked up DNA and RNA in a > JTextPane. It's worked great. I can mark up interesting substrings > with different fonts or background colors and it wraps like you'd > expect -- at the edge of the component. > > All of a sudden, users with the latest JRE on windows (1.5.0_10) are > seeing line breaks at at what looks like "style change" points. It's > as if instead of breaking at the character closest to the edge of the > component, the JTextPane now in this version thinks it can break at > "style boundaries." I can confirm the bug, and that it doesn't happen in 1.5.0_09. It looks similar to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4948033 The example in that bug report also shows incorrect line breaks under newer versions of Java when the i18n property is false, though the incorrect breaks are not exactly the same as with i18n true. I suggest that you report this as a new bug. As far as a solution to your problem goes, you may need to lock your users into a specific version of Java, or go looking for a JTextPane replacement. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24