-
Bug
-
Resolution: Fixed
-
P2
-
1.3.0
-
kestrel
-
generic, sparc
-
generic, solaris_2.6
-
Verified
The JTextField doesn't generate the ActionEvent when run
with jdk1.3. The following program works OK with jdk1.2fcs
This bug caused a working JCK test, Swing's interactive
JFileChooserTests's JFileChooserTest0006 and JFileChooserTest0007
to fail so I'm marking is as a RED bug.
Roger Pham 10/1/99
--------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Jtf extends JFrame implements ActionListener {
Jtf() {
Container c = getContentPane();
c.setLayout(new FlowLayout());
JTextField tf = new JTextField("", 30);
tf.addActionListener(this);
c.add(new JLabel("Type something and hit Return"));
c.add(tf);
setSize(350,200);
setVisible(true);
c.validate();
}
public void actionPerformed(ActionEvent e) {
JTextField tf = (JTextField) e.getSource();
System.out.println(tf.getText());
}
public static void main(String argv[]) {
Jtf f = new Jtf();
}
}
--------------------------------------------------------------
with jdk1.3. The following program works OK with jdk1.2fcs
This bug caused a working JCK test, Swing's interactive
JFileChooserTests's JFileChooserTest0006 and JFileChooserTest0007
to fail so I'm marking is as a RED bug.
Roger Pham 10/1/99
--------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Jtf extends JFrame implements ActionListener {
Jtf() {
Container c = getContentPane();
c.setLayout(new FlowLayout());
JTextField tf = new JTextField("", 30);
tf.addActionListener(this);
c.add(new JLabel("Type something and hit Return"));
c.add(tf);
setSize(350,200);
setVisible(true);
c.validate();
}
public void actionPerformed(ActionEvent e) {
JTextField tf = (JTextField) e.getSource();
System.out.println(tf.getText());
}
public static void main(String argv[]) {
Jtf f = new Jtf();
}
}
--------------------------------------------------------------
- duplicates
-
JDK-4278582 <CR> no longer recongnized as an action by JText actionListiners
- Closed