Consider that you have a Panel
with two children. Now if you set setWidth("*")
for both child then the first child will take the required width and the second child will get whatever is left.
If you set setWidth("60%")
for the first child and setWidth("*")
for the second child then first child will take 60% of the width of the Panel and the second child will get the remaining 40%.
.setWidth100();
and .setHeight100();
these 2 make the component fill the canvas it is in. This mean set width & height 100% which is equivalent to setWidth("100%")
and setHeight("100%")
respectively.
This is basically used when you don't specifically want to set the widths of the child panel's. You specify a rough width of the first child panel and the width of the second child is automatically set.