• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using/extending a Frame

 
Preeti Yarla
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For GUI apps I am not sure how you decide between using a frame(has-a relationship) and extending a frame(is-a relationship). In real-time projects does a design requirement say something about it or does the programmer need to decide that?

This may be simple but I don't know how to choose!

Thanks!
[ June 12, 2008: Message edited by: Preeti Yarla ]
 
arulk pillai
Author
Ranch Hand
Posts: 3388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this out http://www.javalobby.org/forums/thread.jspa?forumID=61&threadID=16487


Favor composition over inheritance.
[ June 12, 2008: Message edited by: arulk pillai ]
 
Preeti Yarla
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks arulk! The link has good arguments for both composition and inheritance. But I could decide that for all the examples I have been working on so far composition is the right choice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic