I am not clear from the documentation – when I indicate a cell width
panel.add(cc,"width 100:200:300");
am I requesting a min:pref:max width for the cell or for the component in the cell?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From my experience it is best to enforce this kind of constraints at the layout level, which achieves a more consistent behaviour.
For example,
where the second parameter sets the layout properties for columns (four columns in this case with specific preferred and maximum widths). Then components are added to the container with this layout manager by simply calling
with or without the “wrap” option (which indicates the need to create a new row).