fun EventTarget.addChildIfPossible(node: Node) { when (this) { is UIComponent -> root.addChildIfPossible(node) is BorderPane -> center = node is ScrollPane -> content = node is Tab -> content = node else -> getChildList()?.add(node) } }