Viewing HTML inside Applet without using JEditorPane

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2009-01-05T13:14:21Z Indexed on 2010/04/02 1:03 UTC
Read the original article Hit count: 450

Filed under:
|

Hello,

I have a small (500kb) swing applet that displays very simple/limited set of small HTML page(s) inside it with JEditorPane, however this does not seem to work 100% fluently, some customers get a blank page displayed without any java exceptions. The page works OK from my machine. I need a more reliable way to show HTML page to all our users.

Any ideas if there is a small + free class to use instead of JEditorPane OR is there an easy fix to make it more reliable (non blank)

private JEditorPane m_editorPane = new JTextPane();


    m_editorPane.setEditable( false);

    m_editorPane.setBackground(new Color(239  ,255, 215));
    m_editorPane.setBounds(30,42,520,478 );
    m_editorPane.setDoubleBuffered(true);
    m_editorPane.setBorder(null);

    m_editorPane.registerEditorKitForContentType("text/html", "com.xxxxx.SynchronousHTMLEditorKit");


m_editorPane.setPage(ResourceLoader.getURLforDataFile(param.trim()));

© Stack Overflow or respective owner

Related posts about java

Related posts about applet