Name: gm110360 Date: 09/02/2003
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OS VERSION :
SunOS image3 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-60
EXTRA RELEVANT SYSTEM CONFIGURATION :
Behaviour observed in Netscape browser 7.0
A DESCRIPTION OF THE PROBLEM :
When accessing the following applet's textfield:
public class textf extends Applet {
TextField tf = new TextField("Applet",8);
public void init() {
add(tf);
add(tf1);
add(tf2);
tf.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e){
System.out.println("field is: " + e.getActionCommand());
}
}
);
}
}
from the foll. html file:
<applet archive=tf.jar code=textf.class height=100 width=200></applet>
the TextField has the focus when the applet is accessed for the first time.
However, if one goes to a different page and returns to the applet, the
TextField no longer allows user input.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Compile the applet under jre 1.4.2; run it in NS 7.0 on a Sun Solaris 8
where NS uses the jre 1.4.2 Hotspot virtual machine.
You should see the error
- Access the same applet compilation from a PC using Windows 2000, through
MSIE 6.0 or NS 7.1, using jre 1.4.0_01 and it should work ok.
- Compile the applet under jre 1.1.18_10; run it in NS 4.75 on a Sun Solaris 8
where NS uses the jre 1.1.5, and the applet should work consistently.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
- Compile the applet under jre 1.4.2; run it in NS 7.0 on a Sun Solaris 8
where NS uses the jre 1.4.2 Hotspot virtual machine.
The TextField should allow input when it is visible.
- Access the same applet compilation from a PC using Windows 2000, through
MSIE 6.0 or NS 7.1, using jre 1.4.0_01 and it should work ok.
- Compile the applet under jre 1.1.18_10; run it in NS 4.75 on a Sun Solaris 8
where NS uses the jre 1.1.5, and the applet should work consistently.
ACTUAL -
- Compile the applet under jre 1.4.2; run it in NS 7.0 on a Sun Solaris 8
where NS uses the jre 1.4.2 Hotspot virtual machine.
You should see the error
- Access the same applet compilation from a PC using Windows 2000, through
MSIE 6.0 or NS 7.1, using jre 1.4.0_01 and it should work ok.
- Compile the applet under jre 1.1.18_10; run it in NS 4.75 on a Sun Solaris 8
where NS uses the jre 1.1.5, and the applet should work consistently.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class textf extends Applet {
TextField tf = new TextField("Applet",8);
public void init() {
add(tf);
add(tf1);
add(tf2);
tf.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e){
System.out.println("field is: " + e.getActionCommand());
}
}
);
}
}
Source code of the html file to invoke the applet:
<applet archive=tf.jar code=textf.class height=100 width=200></applet>
---------- END SOURCE ----------
(Incident Review ID: 194019)
======================================================================
- duplicates
-
JDK-4877530 Unable to input text into JTextField in 1.4.1_02
-
- Resolved
-