when i open an .java file and set the jtextPane.setPane(file.toURL) . The content in
the JTextPane ie the file content doesnt high light the keywords Look at the first sentence in the first paragraph in the Method Detail section of the
EditorKit setPage(URL url) method. A new default document is set. So we need to find a
way to have your DefaultStyledDocument extension be the default document for the textPane.
One way to do this is to set an EditorKit on the textPane and specify your
DefaultStyledDocument extension as the default document in the createDefaultDocument
method. I tried this in this
test app and it worked okay.