Subclass Frame

Why we prefer a subclass of Frame over an instance of Frame when we creating a window?

Questions by vijay_thezorro   answers by vijay_thezorro

Showing Answers 1 - 3 of 3 Answers

One important reason would be to override the existing paint method which will work only if we subclass Frame and not create an instance of the frame.

However since extends is such a premium in java, we should not waste it by simply subclassing Frame but use it for much more important purpose.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions