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

Scrollbar does not gain focus

XMLWordPrintable

    • sparc
    • solaris_2.6

      OS:In Windows and solaris

      Scrollbar does not gain focus at any time unless it requests eplicitly by calling scrollbar.requestFocus(); Since scrollbar does not gain focus, it is not triggering any KeyEvents. Also it is not triggering any AdjustmentEvents when arrow keys or Page up/dowm keys are pressed.

      A bare java.awt.scrollbar is supposed to gain focus when it is clicked
      or when thro' TAB key traversal. But it is not gaining focus at any time
      except requestFocus(). Since it is not gaining focus it is not listening for
      key events. Hence no AdjustmentEvent is triggered when Arrow keys,Page up/down
      keys are pressed. But Java 2 SE, v 1.3 Doc says it should trigger Adjustment
      event for arrow keys and page up/down keys.
      If it gains focus thro' requestFocus, it triggers all the events perfectly.

      How to reproduce the Bug? -------->

      Run this sample code. You would see a frame with a textarea,scrollbar and
      a button.
      Click the scrollbar and check whether it is getting focus. Focus gained
      message will be displayed in the command prompt if it gets focus.
      if you can't find any such message, the bug is reproduced.
      ( bubble of the scrollbar blinks if it gets focus- you can check this by
      clicking the button scrollbar.requestFocus() )

            dmendenhsunw David Mendenhall (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: