aware of boolean.class — kotlin creates primitive boolean class from javaClass<Boolean>()
don't create panel for titlePane if not needed
cleanup