Win a copy of Practical SVG this week in the HTML/CSS/JavaScript 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.
 
It runs on an internal combustion engine. This ad does not:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!