<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
           "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Java Plug-In 1.6.0 update 10 Test</title>
</head>
<body>
<h2>Test for Problem with Java Plug-In 1.6.0 update 10</h2>
<p><object id="msgspace"
        classid="java:MessageSpace.class" 
        type="application/x-java-applet"
	height="20" width="300"/></p>
<p>
<a onmouseover="document.getElementById('msgspace').setMsg('Hello World!');" 
onmouseout="document.getElementById('msgspace').setMsg('');">Mouse over this 
for message</a>
</p>
<h2>Sources</h2>
<h3>XHTML page source:</h3>
<pre><![CDATA[
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html 
    PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
           "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Java Plug-In 1.6.0 update 10 Test</title>
</head>
<body>
<h2>Test for Problem with Java Plug-In 1.6.0 update 10</h2>
<p><object id="msgspace"
        classid="java:MessageSpace.class" 
        type="application/x-java-applet"
	height="100" width="300"/></p>
<p>
<a onmouseover="document.getElementById('msgspace').setMsg('Hello World!');" 
onmouseout="document.getElementById('msgspace').setMsg('');">Mouse over this for message</a>
</p>
[....]
</body>
</html>
]]></pre>
<h3>Java applet source:</h3>
<pre><![CDATA[
import java.applet.*;
import java.awt.*;

public class MessageSpace extends Applet {
  String msgStr = "";

  public MessageSpace() {
    setBackground(Color.white);
  }

  public void paint(Graphics g) {
    FontMetrics fm = getFontMetrics(g.getFont());
    int lineskip = fm.getHeight()+1;
    int skip=lineskip+5;
    String temp1, temp2;

    temp1 = msgStr;
    int a = temp1.indexOf('\n');
    while (a > -1) {
      temp2 = temp1.substring(0,a);
      g.drawString(temp2,5,skip);
      temp1 = temp1.substring(a+1);
      a = temp1.indexOf('\n');
      skip += lineskip;
    }
    g.drawString(temp1,5,skip);
  }
  
  public void setMsg(String s) {
    msgStr = s;
    repaint();
  }
}
]]></pre>
<ul>.
<li>Applet works fine using &lt;applet&gt; tag in HTML, any version of 
plug-in</li>
<li>Applet works fine using Java plug-in 1.6.0_07 with XHTML and 
&lt;object&gt; tag (compatibility mode)</li>
<li>Applet <strong>breaks</strong> when using Java plug-in 1.6.0_10 with 
XHTML and &lt;object&gt; tag</li>
<ul>
<li>With Java Console set to launch for any applet, it does not launch for 
this page</li>
<li>After mouseover event, browser error console shows message that 
document.getElementById("msgspace").setMsg() is not defined</li>
</ul>
<li>This page is XHTML with &lt;object&gt; tag (see above)</li>
<li>Using browser:  Firefox 3.0.4</li>
<li>Using OS: Windows Vista with SP1 installed</li>
</ul>
</body>
</html>

