Here is a quick example of loading Google using JEditorPane. I hope this is what you are looking for, but I'm still not 100% sure what exactly you want. If you could provide a little more information about what you are doing, I would be able to help you more.
import javax.swing.*;
public class GetWebPage {
public static void main(String args[]) throws Exception {
JEditorPane website = new JEditorPane("http://www.google.com/");
website.setEditable(false);
JFrame frame = new JFrame("Google");
frame.add(new JScrollPane(website));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.pack();
}
}
Anton source
share