I created a public class MyMenuBar just to use the getItems()
method, which is protected in MenuBar:
........
public class MyMenuBar extends MenuBar {
// super constructor
public MyMenuBar(boolean bool) {
new MenuBar(bool);
}
// 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:
.........
MenuBar menuBar = root.getSubMenu();
local_mmb = ((MyMenuBar) menuBar).getItems();
........
Where am i wrong?
--
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.