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.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.61] | ![]() | ||
| You are visitor number 30,656. | |||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/htmlrendering.html | J:\mindprod\jgloss\htmlrendering.html | ||