In JDK1.2FCS, JEditorPane does not properly display HTML content
in applet (but does so in an application). Even this simple
HTML is not displayed correctly.
<html>
<body>
<h1>test</h1>
</body>
</html>
Display of the above HTML in JEditorPane incorrectly displays
"test" without showing as a heading. This works correctly
in SWING 1.0.3 in JEditorPane/Application as well as in JDK1.2FCS
in a Java application (as opposed to the applet).
Below is another example of garbled HTML:
>1. Compile the applet source shown below:
>
> import javax.swing.*;
>
> public class TestHtml extends JApplet
> {
>
> public void init()
> {
> try {
> JEditorPane e = new JEditorPane(getParameter("url"));
> e.setEditable(false);
>
> getContentPane().add(e);
> } catch(java.io.IOException e) {
> e.printStackTrace();
> }
> }
>
> 2. Set the url parameter below to any http URL:
> <html>
> <head>
> <title>HTML bug</title>
> </head>
> <body>
> <center>
> <APPLET NAME="TestHtml" CODE = "TestHtml"
> WIDTH = 500 HEIGHT = 500 >
> <PARAM name="url" value="Any http URL here">
> </APPLET>
> </center>
> </body>
> </html>
>
> 3. Run the above applet.
>
> 4. The HTML is not displayed correctly. It is totally
> garbled.
>
> Example HTML file tha tis garbled:
>
> <html>
> <head>
> <title>Test</title>
> </head>
> <body>
> <h1>test</h1>
> <ul>
> <li> one </li>
> <li> two </li>
> </ul>
> </body>
> </html>