What does validate() pack() mean in Frames

Questions by sudha_e   answers by sudha_e

Showing Answers 1 - 2 of 2 Answers

shyju

  • Jun 20th, 2006
 

validate() method is used to cause a container in frames to lay out its subcomponents once again. It should be invoked when this container's subcomponents are modified.

  Was this answer useful?  Yes

rabbi

  • Jun 29th, 2006
 

if you change any sub component in a top label container then ,suppose you change some button layout in a frame then that will automatically call by paint to update to validate. that means three method will call one after another . The pack method sizes the frame so that all its contents are at or above their preferred sizes. An alternative to pack is to establish a frame's size explicitly by calling setSize or setBounds (which also sets the frame's location). In general, using pack is preferable to calling setSize, since pack leaves the frame's layout manager in charge of the frame's size, and layout managers are good at adjusting to platform dependencies and other factors that affect component size.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions