cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

DevFaqEditorJEPForMimeType

Revision as of 15:40, 6 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

How can I create JEditorPane for a specific document type?

You need to find the right EditorKit first and then set it on your JEditorPane.

Here is an example showing how to do that for a java file.

EditorKit kit = CloneableEditorSupport.getEditorKit("text/x-java");

JEditorPane jep = new JEditorPane();
jep.setEditorKit(kit);

Applies to: NetBeans 6.0
Platforms: All
See also: CloneableEditorSupport.getEditorKit()