public JEditorPane(URL u)
JFrame f = new JFrame("O'Reilly & Associates");
f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
try {
URL u = new URL("http://www.oreilly.com");
JEditorPane jep = new JEditorPane(u);
jep.setEditable(false);
JScrollPane scrollPane = new JScrollPane(jep);
f.getContentPane().add(scrollPane);
}
catch (IOException e) {
f.getContentPane().add(
new Label("Could not load http://www.oreilly.com"));
}
f.setSize(512, 342);
f.show();