Possible to do JPanel drawing without extending?
Hi - noob question but I've just read a few authoritative-sounding posts on the net saying how extending JFrame is a bad idea, design-wise, if all you're trying to do is create a frame.
Does the same apply to JPanel? If all I want to do is set up a panel and do some drawing on it, don't I just need an instance of a JPanel rather than a subclass, if you know what I mean?
All the examples I've seen of JP drawing extend it, then override paintComponent(). Is that possible using composition, rather than inheritance?
thanks in advance.