This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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
Try setPreferredSize( Dimension )... FlowLayout honours each component's preferred size.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Jan 18, 2002
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