-
Bug
-
Resolution: Fixed
-
P4
-
1.4.1
-
mantis
-
x86
-
windows_2000
Name: gm110360 Date: 07/31/2002
FULL PRODUCT VERSION :
java version "1.3.1_02"
FULL OPERATING SYSTEM VERSION : Windows 2000
A DESCRIPTION OF THE PROBLEM :
Delete button action is not firing keytyped event. Where as
backspce is firing the same. I think delete button should
fire keytyped event. Becaude delete button action is
changing contents in the text field.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a JTextField
2. Add keylistener interface
3. type delete button
EXPECTED VERSUS ACTUAL BEHAVIOR :
It should fire keytyped event.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class TextFieldTest extends JFrame
{
public TextFieldTest()
{
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent ev)
{
System.exit(0);
}
});
JTextField tf = new JTextField(10);
tf.addKeyListener(new KeyAdapter()
{
public void keyTyped(KeyEvent ev)
{
System.out.println("key pressed");
}
});
getContentPane().setLayout(new FlowLayout());
getContentPane().add(tf);
setLocation(200,100);
setSize(400,300);
setVisible(true);
}
public static void main(String[] args)
{
new TextFieldTest();
}
}
---------- END SOURCE ----------
(Review ID: 158723)
======================================================================