texerasmo
21-06-2005, 11:18
import java.net.URL;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
/**
*
* @author erasmo
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
JTextPane jTxtPane = new JTextPane();
JScrollPane jScrollPane = new JScrollPane();
jScrollPane.getViewport().add(jTxtPane);
try{
URL url = new URL("http://www.ioprogrammo.it");
jTxtPane.setPage(url);
}catch(Exception e){
e.printStackTrace();
}
}
}
non vedo nulla perchè?
dovrei vedere un pagina html in un'applicazione.
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
/**
*
* @author erasmo
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
JTextPane jTxtPane = new JTextPane();
JScrollPane jScrollPane = new JScrollPane();
jScrollPane.getViewport().add(jTxtPane);
try{
URL url = new URL("http://www.ioprogrammo.it");
jTxtPane.setPage(url);
}catch(Exception e){
e.printStackTrace();
}
}
}
non vedo nulla perchè?
dovrei vedere un pagina html in un'applicazione.