Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Container

 
bala kan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi Guys,

when we use JFrame applications, we often use Container




in the above code, we use getContentPane().. why we can't directly add components into the JFrame

please explain me

Thanks in Advance
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> why we can't directly add components into the JFrame

what happened when you tried it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic