Switch from JEditorPane to use the CookSwing API which renders directly from XML to Swing Components. (http://cookxml.yuanheng.org/cookswing/)