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

Swing FocusManager severely underpowered

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.1.6, 1.2.0
    • client-libs
    • beta
    • x86
    • windows_95



      Name: ca25432 Date: 08/28/98


      A complaint to Sun, logged with the bugbase:

      At the moment there is no quick and
      simple way to get the currently focused
      component. This is madness.
      I have to recurse down my components tree
      asking each component in turn if it has focus.
      There needs to be a FocusManager.getFocusComponent()
      method.

      Simply route *ALL* focus changes through
      the FocusManager, not just keyboard ones.

      There needs to be one place where the changing
      of focus can be monitored without having to
      wire up every one of my components up to a listener.

      At the moment using the mouse to change focus
      simply bypasses the poor old FocusManager.

      It would also be a good idea if the focus
      manager knew something about the possible existance
      of DesktopManager, so that if I tab between
      InternalFrames it will try to make a frame active.

      At the moment an active frame does not mean
      it has focus, and visa-versa. Utter madness to
      any user trying to use an internalframe based app.

      The very concept of a component having a flag to say whether it
      has the focus or not is inherently broken. This leads to the
      possible representation of a physically untenable situation,
      i.e. more than one component can claim to have focus.

      There should be a singleton pointing to the current focused
      component, if any.

      The hasFocus() method should simply compare "this" with the focus
      component.

      Come one Swing guys and girls, fix this massively dumb design
      flaw before you go live with 1.2 and you wire in for good
      such a broken concept.

      Swing will also go faster as you won't be spending so much time
      trying to hunt down the focus component, as it does now.

      Dino.
      (Review ID: 37358)
      ======================================================================

            hgajewsksunw Hania Gajewska (Inactive)
            caustinsunw Calvin Austin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: