Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Gridbaglayout problom

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ranchers,
i needs a frame with 5 panels.
i m using GridBagLayout as layout manager for my frame
One of my panel uses GridLayout.
One of my panel uses GridBagLayout.
Rest of the panels does'nt need any layuot(default,Flowlayout).
First i added 5 empty panels for correcting the location of each panel.i made a nice skeleton for adding the panels(positioning is over)
then i replaced temporary panels with 'original' panels.but when i add the panel which uses GridLayout,the propotion of frame changed undesirably.The same problom occured when i tried to add my gridbaglayout panel.
do i need to specify setSize() for each panel?.
basha
 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anybody have any idea??.it's urgent.
basha
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try setPreferredSize( Dimension )... FlowLayout honours each component's preferred size.
 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi nate,
but i wanna stretch some componets.
Even though i 've tried in all the way. even i tried with setSize() on each component.
I just dont getting the problom.i read all the topics /tutorials availeable on this issue.none of them pointing to the real problom.
There is something unknown in GridBagLayout.The stretching strategy of this layout is not straightforward as documentation says.Dont getting answer from any tutorials/topics.
Either i 've to find the solution or the real problom.
basha
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post your current code for the top level container? Maybe I can figure something out if I see what constraints you are using on your GridBagLayout...
 
His brain is the size of a cherry pit! About the size of this ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic