JTextPane with XML-code highlight Permanently deleted user Created April 03, 2009 12:42 How can I create new JTextPane or another editor pane with default IDEA's XML code highlight?
You can not use JTextPane but you can create a proper editor component instead.
PsiFile file = PsiFileFactory.getInstance(project).createFileFromText(...) - create a file
Document document = PsiDocumentManager.getInstance(project).getDocument(file) - get the document
Editor editor = EditorFactory.getInstance().createEditor(document, project) - create an editor for your document
Use editor.getComponent() to render you text editor (in place of your JTextPane)
Thanks!