JEditorPane is simpler than the documentation suggests. You don’t need to get involved with Document structure. You can simply feed it raw HTML text. If you don’t embed the JEditorPane in a JScrollPane, the screen will twitch, a bug in Swing. You would think JEditorPane would be a subclass of JTextPane, but it is the reverse. In the constructor, pass it text/plain for ordinary text or text/html for HTML.
| You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | |
| http://mindprod.com/jgloss/jeditorpane.html | J:\mindprod\jgloss\jeditorpane.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.191.108] | |
| Feedback | You are visitor number 23,425. | |