Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need a layout in java which contains only one column and number of rows are increasing during my app! (something like flowlayout but in vertical mode!)
I find :
panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));

but I want each row component has its minimum size (which its content could be view)!
so how can I privent BoxLayout respects the component's maximum size?
Posted
Updated 21-Jul-14 6:13am
v2

1 solution

Use the GridLayout[^]. Instantiate it with rows = 0 and then you can add as needed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900