JEditorPane herşeyi sizin için hallediyor. Komplex sayfalar için tavsiye etmiyorum. Chrome yada Firefox ta gördüğünüz görüntüyü elde edemezsiniz. Layout ta kaymalar oluşuyor.
Sizin için hazırladığım örnek class a bakabilirsiniz:
package com.alper.onur;
import java.awt.BorderLayout;
import java.io.IOException;
import javax.swing.JDialog;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;
public class EditorPane extends JDialog
{
public EditorPane() throws IOException
{
this.setModal(true);
this.setTitle(“Editor Pane”);
this.setResizable(false);
this.setLayout(new BorderLayout());
try
{
JEditorPane htmlPane = new JEditorPane(“http://www.alperonur.net”);
htmlPane.setEditable(false);
JScrollPane scrollPane = new JScrollPane(htmlPane);
this.setContentPane(scrollPane);
}
catch (IOException e)
{
e.printStackTrace();
}
this.setSize(800, 600);
this.setVisible(true);
}
public static void main(String[] args)
{
try
{
new EditorPane();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}