Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pack() method

 
memati bas
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I could not understand entirely that what the purpose of pack method is in Frames ??
Would you please explain by giving example code snippet ?
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does the work to actually lay out all the components on the user interface, size them, and thus size the screen itself.

Just create a Swing application without calling pack() and see what happens.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic