|
Quick Lists
|
|
Bug ID:
|
6541987
|
|
Votes
|
0
|
|
Synopsis
|
JColorChooser dn't disappear when escape key is pressed, when focus is in JSpinner
|
|
Category
|
java:classes_swing
|
|
Reported Against
|
|
|
Release Fixed
|
7(b20)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
6590667
|
|
Submit Date
|
03-APR-2007
|
|
Description
|
JColorChooser dn't disappear when escape key is pressed, when focus is in JSpinner or when the focus in the Color Name textfield , but when the focus is on some other components on the JColorChooser it gets disappeared. This works fine in native demo gtk-demo.
Step to reproduce
------------------
1) Run the SwingSet2.
2) Select JColorChooser demo.
3) Click on the "Background" button. You will see a JColorChooser dialog.
4) press "Escape key" Observe that JColorChooser dialog gets disapper.
5) Repeat step (3).
6) click on "Hue" Jspinner. press "Escape key" Observe that JColorChooser dialog dn't gets disappear.
7) press tab & get the focus on "Color Name" textfield . press "Escape key" Observe that JColorChooser dialog dn't gets disappear.
If you see the same then the bug is reproduced. This can be reproduced in all look and feel. I tried in jdk 1.5.0 b64 to jdk 7.0 b10 & its reproduced.
Posted Date : 2007-04-03 11:14:28.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
This problem isn't isolated to GTK. The problem appears with other L&Fs too. I suspect an issue with how the ESCAPE key is bound in JColorChooser.
Posted Date : 2007-04-05 16:26:29.0
This is a problem of JFormattedTextField that is used as default editor in JSPinner.
Posted Date : 2007-04-17 15:23:50.0
Also JColorChooser don't disappear when escape key is pressed,
when focus is in non-editable JTextField.
I think we should not aloow to set focus there.
Posted Date : 2007-04-17 15:23:50.0
Alex found that deprecated KeyStroke is used in JColorChooser.
We should replace it with the following KeyStroke:
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
Posted Date : 2007-08-07 17:10:41.0
The following methods
KeyStroke.getKeyStroke((char) KeyEvent.VK_ESCAPE, false)
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0)
create different key strokes.
The first method creates deprecated key stroke
that conflicts with the key stroke of text component.
Posted Date : 2007-08-08 16:54:28.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |