I have the following situation:
I need my class let's say A to extend JComponent and a different class let's say B.
Now, I know that multiple inheritance is not possible in java, and that a proper way to do this would be to implement BInterface which will give me access to all methods from B.
The issue is that class B contains ~15 methods, and inside A I only need to override 2 of them, and all the other ones to use the 'super' implementation.
Question is: is there a possible way to do this without having to implement inside A all the methods from B?
Note: I'm not trying to add too much complexity to my code, if the 'workaround' for this problem breaks oop programming principles then I should better redesign my code.
Aonly needs 2 members out ofB, those two members should probably exist in their own type, so clients won't have to rely on the entirety ofBjust to access the few dependencies they need. Segregate the interface.