Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6675956
Votes 2
Synopsis REGRESSION : Different behavior of Container.findComponentAt in jdk5
Category java:classes_awt
Reported Against
Release Fixed 5.0u18-rev(b04), 5.0u19(b02) (Bug ID:2175513)
State 10-Fix Delivered, Verified, bug
Priority: 3-Medium
Related Bugs
Submit Date 17-MAR-2008
Description
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  customer .
 In jdk5, findComponentAT does not seem to return correct value.
Posted Date : 2008-03-17 04:08:11.0
Work Around
N/A
Evaluation
Indeed, Container.findComponentAt() is broken in JDK1.5 for some unknown reason, while with 1.4.2, 6.0, 6.0_10 and 7.0-b21 the test behaves correctly.
Posted Date : 2008-03-19 15:44:19.0

Container.findComponentAt() calls Component.isRecursivelyVisible()
which requires all parents to be visible. However for top level components its parent doesn't have to be visible.
Posted Date : 2008-05-01 18:58:42.0
Comments
  
  Include a link with my name & email   

Submitted On 29-JUL-2008
Mamoru_Kurashima
Where is TP2?


Submitted On 29-MAR-2009
I downloaded 5.0u18, but build version is 1.5.0_18-b02.
How to download 5.0u18-rev(b04)?



PLEASE NOTE: JDK6 is formerly known as Project Mustang