static JComponent getTitlePaneComponent(RootPaneContainer window) { if (window instanceof JInternalFrame) ret getInternalFrameTitlePaneComponent((JInternalFrame) window); if (!substanceLookAndFeelEnabled() || window == null) ret null; JRootPane rootPane = window.getRootPane(); if (rootPane != null) { O /*SubstanceRootPaneUI*/ ui = rootPane.getUI(); return (JComponent) call(ui, "getTitlePane"); } return null; }