• Post Reply Bookmark Topic Watch Topic
  • New Topic

Composition - Add menubar to frame

 
Matt Fielder
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still a little cloudy on composition.
I have my frame class that hold just my frame.




Then I have my Menu Bar class.




I understand I don't need a main in the AIOMenu class, but what do I need in its place?
I want to use composition to get the Menu in the Frame.

Do I want to put (into the Frame class):
AIOComm.add(new AIOMenu)

How do I glue the two together. I've read so many examples that all do it differently and its not helping. Its actually clouding the issue. Yes, I know I've kinda asked similar questions before.

Feelin stupid right now.
Thank you...
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instructios are vague because there are so many ways to put things together. Here's one way to use composition:

Instead of this

you could do this

or even
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!