look at how tornadofx does it(that is the standard...
# tornadofx
r
look at how tornadofx does it(that is the standard way of doing that)