Step 22: Set the weights to several components from layout.