also, that statement in your last snippet (line 3)...
# tornadofx
r
also, that statement in your last snippet (line 3) is not an assignment, it's just a getter call for the root property. If you are not using the builder methods to create the elements on the fly it's a good idea to use the .add method