-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.3.0
-
x86
-
generic
Name: jbT81659 Date: 07/13/2000
Deleting Text in JPassword Field using Delete Key causes the following:
- Cursor disappears.
- All JPassword text "*" disappears as Delete key is pressed a couple of times
To reproduce this bug:
Compile and run the following code
Insert Password text into JPasswordField
Use the Delete key to delete text
Note that all text in JPassword disappears as you press the Delete a couple of times.
-----Code--------
/* Copyright (c) Sun Microsystems 1998
$Header: /home/sun/src/JDK1.2/jPasswordField.java,v 1.13 2000/03/30 08:13:08 isam Exp $
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class jPasswordField extends JApplet
{
public void init()
{
pass1 pass = new pass1();
getContentPane().add(pass);
}
public static void main(String[] argv)
{
JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
frame.setContentPane(new pass1());
frame.pack();
frame.setVisible(true);
frame.addWindowListener( new WindowAdapter()
{
public void windowClosing( WindowEvent e)
{
System.exit(0);
}
});
}
}
class pass1 extends JPanel
{
public pass1()
{
JPanel p = new JPanel();
p.setLayout(new GridLayout(2, 2, 2, 2));
JLabel label1 = new JLabel();
label1.setFont(new Font("Lucida Sans regular",Font.PLAIN,10));
label1.setText("\u0627\u0644\u0625\u0633\u0645\u0020\u05e9\u05dd");
p.add(label1);
p.add(new JTextField());
JLabel label2 = new JLabel();
label2.setFont(new Font("Lucida Sans regular",Font.PLAIN,10));
label2.setText("\u05e1\u05e1\u05de\u05d4\u0020\u0643\u0644\u0645\u0629\u0020\u0627\u0644\u0633\u0631");
p.add(label2);
JPasswordField pass = new JPasswordField();
pass.setEditable(true);
p.add(pass);
setLayout(new FlowLayout());
add(p);
validate();
}
}
WorkAround:
======================================================================
- duplicates
-
JDK-4284717 kestrel-L: cursor disappeared with delete key action in bidi JTextField
-
- Closed
-