Problema al cargar pagina web en JEditorPane

alberto
27 de Noviembre del 2002
Estoy haciendo una aplicacion en en java que incluye una navegador. Al cargar determinadas paginas el proceso se ralentiza llegando a tardar casi 20 segundos.Cargo las paginas en un JEditorPane mediante el metodo setPage. Quisiera saber cómo acelerar la carga de las paginas o cómo poner una barra de progreso. Gracias.

isaul
27 de Noviembre del 2002
prueba esto:

JEditorPane html;

try {
URL url = null;
String path = "file:/C:/manual.htm";
try {
url = new URL (path);
}
catch (Exception e) {
System.err.println("Failed to open " + path);
url = null;
}

if(url != null) {
html = new JEditorPane(url);
html.setEditable(false);

JScrollPane scroller = new JScrollPane();
JViewport vp = scroller.getViewport();
vp.add(html);


espero que te sirva.
Panel().add(scroller, BorderLayout.CENTER);

isaul
27 de Noviembre del 2002
prueba esto:

JEditorPane html;

try {
URL url = null;
String path = "file:/C:/manual.htm";
try {
url = new URL (path);
}
catch (Exception e) {
System.err.println("Failed to open " + path);
url = null;
}

if(url != null) {
html = new JEditorPane(url);
html.setEditable(false);

JScrollPane scroller = new JScrollPane();
JViewport vp = scroller.getViewport();
vp.add(html);
Panel().add(scroller, BorderLayout.CENTER);

espero que te sirva.