Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4493590

would like an API to discover the reason for focus_gained

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • None
    • 1.4.0
    • client-libs
    • Fix Understood
    • x86
    • windows_nt

      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)
      ======================================================================

            ant Anton Tarasov (Inactive)
            mthakore Mayank Thakore (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: