[ Back | Previous | Next ]

How to use JEditorPane as a browser?

Package:
javax.swing.text.*
Product:
Swing
Release:
1.x
Related Links:
General
JEditorPane
PlainDocument
Comment:
More here
JEditorPane editorPane = new JEditorPane();
          editorPane.setEditable(false);
          ...//create a URL object for the TextSamplerDemoHelp.html file...
          try {
              editorPane.setPage(url);
          } catch (IOException e) {
              System.err.println("Attempted to read a bad URL: " + url);
          }
1