You must call layout(true) on the parent after changing anything about the children that might affect the sizing or position of the children (such as creating new children, changing the font of the children, changing the text or image of a child, adding children to a child ...).
Since these changes are done programmatically, they do not cause events to happen. Consequently, the parent doesn't know anything about the changes and has to be told though the layout() method. This strategy also helps reduce flash because you can change a bunch of stuff programmatically such as the font on every child and then tell the parent to lay itself out once and there is just one redrawing of all the widgets and not one per change.
If you do not call layout(true) what you will find is that the children do not appear properly until the parent is somehow resized - a problem if you have done all your changes after the window has been opened. Note that opening a shell (shell.open()) will cause a layout to occur.
This stuff is described in the document Understanding Layouts in SWT posted in the articles section of Eclipse corner - a very worthwhile read.