void (@NotNull Object frameObject, int height) { JRootPane rootPane; if (frameObject instanceof JFrame) { rootPane = ((JFrame)frameObject).getRootPane(); } else if (frameObject instanceof ProjectFrameHelper frameHelper) { rootPane = frameHelper.getFrame().getRootPane(); } else { return; } if (rootPane == null) { return; } JComponent filler = (JComponent)rootPane.getClientProperty(WIN_TAB_FILLER); if (filler == null) { return; } if (height > 0) { height++; } boolean visible = height > 0; boolean oldVisible = filler.isVisible(); filler.setVisible(visible); filler.setPreferredSize(new JBDimension(-1, height)); Container parent = filler.getParent(); if (parent == null || oldVisible == visible) { return; } parent.doLayout(); parent.revalidate(); parent.repaint(); }