x k no m muestra la ventana?
Necesito que me muestre una pantalla con un documento html, y para ello he desarrollado el siguiente codigo pero al ejecutarlo no m muestra nada:
private void jmiManualActionPerformed(java.awt.event.ActionEvent evt) {
JFrame frame=new JFrame();
JScrollPane scroll= new JScrollPane();
java.net.URL url = getClass().getClassLoader().getResource("html/ayuda.html");
try {
JEditorPane jepAyuda= new JEditorPane (url);
frame.setTitle("Manual");
scroll.setViewportView(jepAyuda);
frame.setSize(1000,700);
frame.add(scroll);
frame.setVisible(true);
}
catch (IOException e) {
System.err.println("Error al leer la URL.");
}
}
¿que le okurre al codigo?
Muchas gracias.
private void jmiManualActionPerformed(java.awt.event.ActionEvent evt) {
JFrame frame=new JFrame();
JScrollPane scroll= new JScrollPane();
java.net.URL url = getClass().getClassLoader().getResource("html/ayuda.html");
try {
JEditorPane jepAyuda= new JEditorPane (url);
frame.setTitle("Manual");
scroll.setViewportView(jepAyuda);
frame.setSize(1000,700);
frame.add(scroll);
frame.setVisible(true);
}
catch (IOException e) {
System.err.println("Error al leer la URL.");
}
}
¿que le okurre al codigo?
Muchas gracias.
