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

REGRESSION : Different behavior of Container.findComponentAt in jdk5

XMLWordPrintable

    • b04
    • x86
    • windows_xp
    • Verified

        The behavior of Container.findComponentAt in jdk5 is different form that in jdk1.4.2 and jdk6.
        Those should be the same.

        REPRODUCE :
         1)Compile the attached program and invoke "java TP2" in each jdk version.
         2)Click "findComponentAt(100, 100)" button.
         3)Input some text string in text field
         4)Click "findComponentAt(100, 100)" button.
         Only the message in jdk5 is different, only "null" shows up.

        RESULT:
        The followings are the result in several jdk versions.
        K:\usersJ\licensee-work\ContainerfindComponentAt>java -showversion TP2
        java version "1.4.2_16"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05)
        Java HotSpot(TM) Client VM (build 1.4.2_16-b05, mixed mode)

        java.awt.TextField[textfield0,4,30,292x243,text=,editable,selection=0-0]
        java.awt.TextField[textfield0,4,30,292x243,text=kakdshfiwehkslah,editable,selection=16-16]

        K:\usersJ\licensee-work\ContainerfindComponentAt>java -showversion TP2
        java version "1.5.0_15"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
        Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode)

        null
        null

        K:\usersJ\licensee-work\ContainerfindComponentAt>java -showversion TP2
        java version "1.6.0_04"
        Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
        Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)

        java.awt.TextField[textfield0,4,30,292x243,text=,editable,selection=0-0]
        java.awt.TextField[textfield0,4,30,292x243,text=kajdhsfpiwaehnvdsaklhdsahf,editable,selection=26-26]

        NOTE:
         The test program tries to get component at specified axis.
         In jdk5, findComponentAT does not seem to return correct value.

              miroslawzn Miroslaw Niemiec (Inactive)
              tbaba Tadayuki Baba (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: