Exception occurs while reading mails with different MIME Types in a JEditorPane...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajiv_M
Posted On:   Tuesday, May 8, 2001 04:24 AM

I created a mail application using JavaMail API 1.2 version. The messages(mails) are displayed in a JEditorPane whose content type is set programmatically according to the message content type. But after i read a "text/html" message when i try to read a "text/plain" message i get a null pointer exception and the printstacktrace gives: at javax.swing.text.html.StyleSheet.getRule(StyleSheet.java:182) at javax.swing.text.html.StyleSheet$ViewAttributeSet. (StyleSheet.java:2767) at javax.swing.text.html.StyleSheet.getViewAttributes(StyleSheet.java:285) at javax.swing.text.html.BlockView.setPropertiesFromAttributes(BlockView.java:314) at javax.swing.text.html.BlockView.setParent(BlockView.java:59)....... How can i ta   More>>

I created a mail application using JavaMail API 1.2 version.
The messages(mails) are displayed in a JEditorPane whose content type is set programmatically according to the message content type.
But after i read a "text/html" message when i try to read a "text/plain" message i get a null pointer exception and the printstacktrace gives:
at javax.swing.text.html.StyleSheet.getRule(StyleSheet.java:182) at javax.swing.text.html.StyleSheet$ViewAttributeSet. (StyleSheet.java:2767) at javax.swing.text.html.StyleSheet.getViewAttributes(StyleSheet.java:285) at javax.swing.text.html.BlockView.setPropertiesFromAttributes(BlockView.java:314) at javax.swing.text.html.BlockView.setParent(BlockView.java:59).......
How can i tackle this?

   <<Less
About | Sitemap | Contact