java.net.URL url = new java.net.URL ( "http://mindprod.com" ); getAppletContext().showDocument( url );That code will fail with a NullPointerException if you attempt it in an application. You can catch all exceptions and just ignore the request in code that sometimes runs as an Applet and sometimes as an application.
There are some catches:
output = new JEditorPane(); output.setContentType( "text/html" ); output.setEditable( false );From then on text in the pane is rendered as HTML. You can also use
output.setPage( "http://mindprod.com" );to render a page.
This page is posted |
http://mindprod.com/jgloss/htmlrendering.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\htmlrendering.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.22.79.165] |
| |
Feedback |
You are visitor number | |