Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JEditorPane - content text/html problem

 
Wolfgang Tintemann
Ranch Hand
Posts: 65
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the API of JEditorPane I read the following :

By default, the following types of content are known:
text/plain Plain text, which is the default the type given isn't recognized. The kit used in this case is an extension of DefaultEditorKit that produces a wrapped plain text view.
text/html HTML text. The kit used in this case is the class javax.swing.text.html.HTMLEditorKit which provides HTML 3.2 support.
text/rtf RTF text. The kit used in this case is the class javax.swing.text.rtf.RTFEditorKit which provides a limited support of the Rich Text Format.

Does that mean that I cant show e. g. HTML 4.01 pages in the pane ?

At least when I try to show such a ( very simple, only basic html tags ) page in the pane I get a null pointer exception dealing with so called Glyphs (?).
When I show a plain text in my applet panel all works fine.

What happens here ?
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. It means that you can display anything which conforms to HTML 3.2. The editor may well be able to display pages which are declared as HTML 4.01 if they do in fact conform to HTML 3.2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic