• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setLayout and setVisibile

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any effect of setLayout after the container setvisble (true) is called ?
In the case of Frame , its default Layout is BorderLayout , so it adds components in that manner unless some other Layout is specified.

that too no effect, after it is displayed.
Is this observation correct ?

regards
Binu K Idicula
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume that you don't want to change the layout manager, but just want to add say another component to an existing container managed by a layout manager, after setVisible() has been called.
I'm being lazy here and guessing that the validate() method will do the trick. The validate() method causes the layout manager to evaluate the new situation and jiggle the widgets around and redisplay them.
Write a code snippet and test it.
-Barry
[ August 12, 2002: Message edited by: Barry Gaunt ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic