Duplicate :
|
|
Relates :
|
|
Relates :
|
Name: mt13159 Date: 08/17/2001 It would be useful to be able to tell why a component received focus whether it was from keyboard navigation or some other means. Specifically Oracle has implemented its own widget set. That widget set includes a simple text field. We would like to select all the text when the user tabs into the text field. We do not want to select all the text when the user clicks in the text field. The Swing JTextField has the same requirement. Right now tab into a JTextField and all the text gets selected. Click into a JTextField and all the text gets selected for a moment until the cursor moves to the mouse point. Adding an API on FocusEvent would make it extremely easy to determing if focus was received due to a keyboard navigation event or some other call to requestFocus(). (Review ID: 128544) ======================================================================
|