public void doLayout() {
		if( !topDragComp.isVisible() )
			return;

		int x = 0;
		int y = 0;
		int width = resizeComp.getWidth();
		int height = resizeComp.getHeight();
		if( width <= 0 || height <= 0 )
			return;

		Insets resizeInsets = getResizeInsets();
		int thickness = UIScale.scale( borderDragThickness );
		int topThickness = Math.max( resizeInsets.top, thickness );
		int bottomThickness = Math.max( resizeInsets.bottom, thickness );
		int leftThickness = Math.max( resizeInsets.left, thickness );
		int rightThickness = Math.max( resizeInsets.right, thickness );
		int y2 = y + topThickness;
		int height2 = height - topThickness - bottomThickness;

		// set bounds of drag components
		topDragComp.setBounds( x, y, width, topThickness );
		bottomDragComp.setBounds( x, y + height - bottomThickness, width, bottomThickness );
		leftDragComp.setBounds( x, y2, leftThickness, height2 );
		rightDragComp.setBounds( x + width - rightThickness, y2, rightThickness, height2 );

		// set corner drag widths
		int cornerDelta = UIScale.scale( cornerDragWidth - borderDragThickness );
		topDragComp.setCornerDragWidths( leftThickness + cornerDelta, rightThickness + cornerDelta );
		bottomDragComp.setCornerDragWidths( leftThickness + cornerDelta, rightThickness + cornerDelta );
		leftDragComp.setCornerDragWidths( cornerDelta, cornerDelta );
		rightDragComp.setCornerDragWidths( cornerDelta, cornerDelta );
	}
Resizes frames, dialogs or internal frames.
<p>
Could also be used to implement resize support for any Swing component
by creating a new subclass.

@author Karl Tauber
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowResizer.java