Well...to me this is more an OOPS question. Basically, 'overriding' a method in OOP is to provide a new/different behaviour than what the parent provides...so, if our intention is that, then extending and overriding is the right way to do this...
SCJP 1.4, OCMJEA/SCEA 5.0.
posted 4 years ago
simon fletcher wrote:Is it possible to alter a JPanel's paintComponent() method without extending the JPanel? Just curious. From my short experience using swing, I'm thinking not but wanted to be sure.