• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I override a method of an Inner Class?  RSS feed

 
Matt Wilcko
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to override a method that belong to an inner class of the BasicTreeUI class. How do I do that?
Thanks
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a base class is extended and its nested classes are re-defined in the subclass (even with the same name as the nested class in the superclass), these nested classes do not automatically inherit from the nested class within the superclass. Instead, the re-declared inner class must specifically extend the Base.Nested class. For example...

So to override a method in a nested class, I imagine you need to specifically extend that nested class...

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!