myClass is child class of JPanel and inherits all methods of its super class. To use super class methods in any of this child class method you don't have to instantiate JPanel object. you can override the behavior of super class methods as well in myClass.
in case of
class myClass{
JPanel panel = new JPanel();
}
myClass is like any class, which might want to use methods of JPanel class. Two classes are not related any other way in this case.
if you want to override JPanel methods in some way, you want to extend it. If want to use some of the method, that's all and keep your class open to inherit other classes, instantiate JPanel.
Please also note that you are using two OO concepts in your question. Inheritance and composition. Read these links to have a better understanding of your examples approach.
Regards.
SCJP, OCMJD
please buy this thing and then I get a fat cut of the action:
a bit of art, as a gift, that will fit in a stocking