Acording to Oracles' Java Docs it is clear that.."A subclass inherits all the members (fields, methods, and nested classes) from its superclass. Constructors are not members, so they are not inherited by subclasses, but the constructor of the superclass can be invoked from the subclass."
Similarly goes for the objects. A subclass does not directly inherits the instances of its superclass.
Also according to Java Docs: "Every class we make is a subclass of the Class Object. Still we have to define any methods that we are going to use in that particular class"
So here's what I don't understand. The subclass will recognize the instance 'frame', but all of the methods won't take. For example, the subclass will be undecorated (as called in the superclass), but the SetLocationRelativeTo() won't apply to the subclass. Why some and not others? And why does it recognize 'frame' as a valid object? Thanks again.
The subclass does not recognize frame. It's neither a member of SubPane nor a local variable of SubPane's constructor. Line 27 should not compile because frame is undeclared in SubPane.
A question the need to create a frame inside a panel's constructor. Why does the panel need to know about the frame? Why not add the panel to the frame in another class that acts as a controller?
Whatever you do, NEVER call pack() or setVisible() in a constructor or a method called from a constructor. These methods are able to start new threads, and you should not start threads inside a constructor call.