So, instead of syntax highlighting being associated with a file type, in this case it is associated with a JEditorPane. This scenario will also be covered in the upcoming NetBeans Syntax Highlighting Tutorial.
Update 11 January 2006: You can get the sources of the above syntax highlighted regular expression checker by clicking here. Note that there are several issues: the syntax highlighting works but is not correct; you need to press Enter after entering the pattern, which adds a new line; and sometimes there are strange things going on that I can't explain. Any fixes to this module would be appreciated!