This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How do I override a method of an Inner Class? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How do I override a method of an Inner Class?" Watch "How do I override a method of an Inner Class?" New topic
Author

How do I override a method of an Inner Class?

Matt Wilcko
Ranch Hand

Joined: Sep 23, 2003
Posts: 65
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

Joined: Aug 31, 2004
Posts: 11343

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...



"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How do I override a method of an Inner Class?
 
Similar Threads
local inner class
Anonymous Inner Class Question
Inner Class/Overridding
Inner Class
final & private together