Am 19.10.2010 17:14, schrieb alexoffspring:
> public class MyMenuBar extends MenuBar {
> 
>       // super constructor
>       public MyMenuBar(boolean bool) {
>               new MenuBar(bool);
>       }

What's the purpose of the instantiation without assigning it
to a variable?

>       // the super.getItems() is protected
>       public List<MenuItem> getItems() {
>               return super.getItems();
>       }
[...]

> I don't understand why a get a   java.lang.ClassCastException  when i
> try to cast a MenuBar into a MyMenuBar:

Most likely the element returned by root.getSubMenu is not
an instance of MyMenuBar.


Regards, Lothar

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to