Java (1.6.0_24) with Firefox 4 on MacOSX fails to get component LocationOnScreen
On MacOSX, with Java 1.6.0_24 (or _22), with Firefox 4, the method getLocationOnScreen() fails to get the right coordinate of an applet. The returned value changes each time the mouse leaves/enters inside the applet.
This can be tested by deploying an applet with the given code (cf below) and move the mouse outside/inside the applet.
Its not working with Firefox 4.0. Java Plug-in 1.6.0_24 Using JRE version 1.6.0_24-b07-334-10M3326 Java HotSpot(TM) 64-Bit Server VM (the 32bit mode is never activated even if it's checked in the application "get info" panel)
It's working fine with Firefox 3.6.15. Java Plug-in 1.6.0_24 Using JRE version 1.6.0_24-b07-334-10M3326 Java HotSpot(TM) Client VM
import javax.swing.JApplet;
public class MyApplet extends JApplet { @Override public void start() { Thread t = new Thread() { public void run() { while (true) { System.out.println("Loc : " + MyApplet.this.getLocationOnScreen()); try { sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } } }; t.start(); } }