Unfortunately, the SDK doesn't let a plugin dynamically add or remove controls while presentModalDialog() or presentFloatingDialog() is executing. So generally, for minor situations, I just design around it by using a fixed number of controls or by using visibility. (One trick is to have overlapping controls, hiding one set while showing the other.)
In a few cases in my plugins, where it's very useful to add or remove controls, the plugin uses LrDialogs.stopModalWithResult() to exit the current execution of the dialog, rebuilds the controls, and reruns presentModalDialog().
[Use the reply button under the first post to ensure replies sort properly.]