Name: dbT83986 Date: 01/04/99
I don't know if this bug existed before, but my application echoes the Mnemonic into my JTextField.
Here is the JDK1.2 code:
------------------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SimpleExample extends JPanel
{
static JFrame frame;
public SimpleExample()
{
JButton _testButton = new JButton( "Test" );
_testButton.setMnemonic('T');
add(_testButton);
add(new JTextField(10));
}
public static void main(String s[])
{
SimpleExample panel = new SimpleExample();
frame = new JFrame("SimpleExample");
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{System.exit(0);}
});
frame.getContentPane().add("Center", panel);
frame.pack();
frame.setVisible(true);
}
}
--------------------
It can be reproduced by setting focus on JTextField,
then press <ALT-T>, it echoes 't' in the JTextField.
***
(Review ID: 49034)
======================================================================