protected String layoutLabel( FontMetrics fm, String text, Rectangle textR ) {
			int width = getWidth();
			int height = getHeight();
			Insets insets = getInsets();

			Rectangle viewR = new Rectangle( insets.left, insets.top,
				width - (insets.left + insets.right),
				height - (insets.top + insets.bottom) );
			Rectangle iconR = new Rectangle();

			return SwingUtilities.layoutCompoundLabel( this, fm, text, null,
				getVerticalAlignment(), getHorizontalAlignment(),
				getVerticalTextPosition(), getHorizontalTextPosition(),
				viewR, iconR, textR, getIconTextGap() );
		}
Creates a UI defaults inspector panel that can be embedded into any window.
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java