R
R
roman38472014-04-03 20:57:34
Java
roman3847, 2014-04-03 20:57:34

How to implement display of html pages on JEditorPane?

I created a frame and I'm trying to display an html page on it. But nothing works, what's the matter?

JEditorPane HTMLViewer = new JEditorPane();
frame.add(HTMLViewer);
HTMLViewer.setContentType("text/html");
HTMLViewer.setEditable(false);
try {
HTMLViewer.setPage("http://www.google.ru/");
} catch (Exception e) {
}

Frame has a layout manager installed, maybe because of this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question