Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #262
| From | "Bartek" <bartek@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Problem with JTextPane wo |
| Message-ID | <1164844196.063735.74270@l12g2000cwl.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Hello I try to use JTextPane with HTML content, but I've got a problem with word wrapping. When I use ordinary plain text, everything is fine, but if I change content type to "text/html" word wrapping is "switching off". Longer texts are getting out of the visible JTextPane content. Is there any possibilities to use both HTML and word wrapping in JTextPane ? My second problem is connected with scrolling JTextPane. I try to create simple chat applicaton, and I need to present incoming messages in JTextPane. Unfortunately when I'm adding new content to the end of the JTextPane, the vertical scroll bar is going up (new content is getting invisible). Of course I can scroll down the vertical scroll bar programmatically, but when I'm doing this, my JTextPane is blinking :( (because first it is going up, then return to the bottom). So is there any possibility to avoid this ? I would like to change the vertical scroll bar behaviour to prevent going up when adding new content. I tried to extend JTextPane and change some of it's method e.g. those connected with Scrollable interface, but with no effect :(. Maybe you can help me with this ? Best regards BartekS --- * 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
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar
Problem with JTextPane wo "Bartek" <bartek@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000 Re: Problem with JTextPan "Bart Cremers" <bart.cremers@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web