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

Component.requestFocus does not Work

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_8

      Description

      requestFocus() on JFrames does not work with the X11 versions of java.

      Error reproduction:

      the zorder.jar contains a small sample apploication to reproduce the error.
      start with:
              java -cp zorder.jar zorder.ZOrder
      Two Frames will open. chose from the file menu: File->Tranfer Focus
      note that the other window will be raised but will not be activated.

      The source for the applicatiuon is ZOrder.java inside the zorder.jar.
      the focus transfer should be accomplished by calling this code sequence:
      (yoou will find this sequence in ZOrder.java: transferFocus()

      frame.toFront(); /* will raise the frame */
      frame.requestFocus(); /* will not do anything */

      Please have a look for the attached demo program. Place the 2 JFrames partially above each other. The other JFrame will not get the focus after the menu item is called

      Mea culpa...
      The correct files attached are zorder.tar.Z which unfolds to a zorder directory
      with the file ZOrder.java. The file without the package directory has been attached as well. Sorry for the delay!


      ###@###.### 2001-11-30

        Attachments

          Activity

            People

            Assignee:
            prssunw Prs Prs (Inactive)
            Reporter:
            stschnei Stefan Schneider (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: