This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | cannot set contentType to text/html for jTextPane | ||
---|---|---|---|
Product: | guibuilder | Reporter: | jimkatz <jimkatz> |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
jimkatz
2006-03-16 03:16:24 UTC
When the user attempts to set "text/html" content type then HTMLKit from html/editor module is set to JTextPane. JTextPane refuses EditorKits that are not StyledEditorKits. The HTMLKit doesn't extend StyledEditorKit and therefore it is refused. org.netbeans.module.editor.html.HTMLKit extends org.netbeans.modules.editor.NbEditorKit extends org.netbeans.editor.ext.ExtKit extends org.netbeans.editor.BaseKit extends javax.swing.text.DefaultEditorKit ... java.lang.IllegalArgumentException: Must be StyledEditorKit at javax.swing.JTextPane.setEditorKit(Unknown Source) at javax.swing.JEditorPane.setContentType(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.netbeans.modules.form.RADProperty.setTargetValue(RADProperty.java:99) ... *** Issue 88501 has been marked as a duplicate of this issue. *** I see no problem with text/html in current NB 6.0, but the same failure appears with text/xml. We should probably hack the contentType property and not really write to it. Fixed. It should be possible to enter any value into this property. We ignore possibly thrown IllegalArgumentException (but we do log it into console). Modified file: /cvs/form/src/org/netbeans/modules/form/RADProperty.java new revision: 1.39; previous revision: 1.38 |