fun updateUI() { super.updateUI() if (myTree != null) { myTree.updateUI() } javax.swing.LookAndFeel.installColorsAndFont( this, "Tree.background", "Tree.foreground", "Tree.font" ) }
Overridden to message super and forward the method to the tree . Since the tree is not actually in the component hierarchy it will never receive this unless we forward it in this manner .