-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.1
-
sparc
-
solaris_8
J2SE Version (please include all output from java -version flag):
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
Operating System Configuration Information (be specific):
Solaris 8 with CDE window manager
Bug Description:
Double carets display if running two JVMs.
Steps to Reproduce (be specific):
compile attached test(Test.java) program, start two of them up from
two different xterms and place the windows side by side, and then,
if you move the cursor between the two windows, you will see the focus
gained/loss messages show up. If you do that for a few times, then move
the cursor to the desktop, you will see two flashing cursors.
(Note: with point to type turned on by default in CDE.)
Test program:(Test.java)
---------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Test
extends JFrame
{
public Test()
{
super("hey there");
JTextField jtf = new JTextField();
jtf.addFocusListener(new FocusListener()
{
public void focusGained(FocusEvent fe)
{
System.out.println(System.currentTimeMillis() + " " + this.hashCode() + " Received focus gained\n");
try
{
Thread.sleep(1000);
}
catch (Exception e) {}
}
public void focusLost(FocusEvent fe)
{
System.out.println(System.currentTimeMillis() + " " + this.hashCode() + " Received focus lost\n");
try
{
Thread.sleep(1000);
}
catch (Exception e) {}
}
});
jtf.setFont(new Font("Serif", Font.PLAIN, 200));
getContentPane().add(jtf);
setSize(300, 400);
}
public static void main(String[] args)
{
new Test().setVisible(true);
}
}