• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between JPanel and JFrame

 
micky
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any one tell me about the difference between JPanel and JFrame. Which one is Better to use??
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are probably going to ask you to include a last name Micky.
Think of it like a picture frame hanging on a wall. The wall is your desktop. The JFrame is meant to be the frame. The JPanel is meant to be the family pictures inside the frame. sometimes you have a single picture in a frame. Other times you put multiple pictures layed out in some pattern inside the frame. You should go check out the tutorials on Sun's site. They explain alot.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"micky" -

Welcome to the JavaRanch! Yep... I'm asking you to adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Thanks! and welcome to the JavaRanch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!