classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] RFC: java.awt.DefaultKeyboardFocusManager fix


From: Thomas Fitzsimmons
Subject: Re: [cp-patches] RFC: java.awt.DefaultKeyboardFocusManager fix
Date: Wed, 29 Jun 2005 15:28:14 -0400

On Wed, 2005-06-29 at 15:14 +0200, Jeroen Frijters wrote:
> Hi,
> 
> Can someone who is more up to speed with AWT please take a look at the
> attached patch? While running some AWT code I got a ClassCastException
> in this code and while I didn't quite understand the point of the code
> (or why it failed), it looked to me as if the logic was wrong. It tries
> to find the toplevel window, but if it doesn't find it, it still goes
> ahead and casts the component to a window.

What is the component that is being cast to a window that causes the
ClassCastException?  This code assumes that target is either a window or
packed in a window.  If that assumption holds, then the only time that
parent == null is when target is a window with a null parent.  In this
case, the while loop will fall through and toplevel will be assigned
target.

Maybe a focus event is being delivered to a component that isn't yet
packed in a window, or that has just been removed from a window?  In any
case, I'd be interested to know what components are involved.

Tom

> 
> Thanks.
> 
> Regards,
> Jeroen
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches





reply via email to

[Prev in Thread] Current Thread [Next in Thread]