I believe it's not letting you add because your NamePanel class doesn't extend Component (or some other class).