protected void layoutDock() {
		Dimension desktopSize = desktop.getSize();
		int x = 0;
		int y = desktopSize.height;
		int rowHeight = 0;

		for( Component c : desktop.getComponents() ) {
			if( !(c instanceof JDesktopIcon) )
				continue;

			JDesktopIcon icon = (JDesktopIcon) c;
			Dimension iconSize = icon.getPreferredSize();

			if( x + iconSize.width > desktopSize.width ) {
				// new row
				x = 0;
				y -= rowHeight;
				rowHeight = 0;
			}

			icon.setLocation( x, y - iconSize.height );

			x += iconSize.width;
			rowHeight = Math.max( iconSize.height, rowHeight );
		}
	}
Provides the Flat LaF UI delegate for {@link javax.swing.JDesktopPane}.

<!-- BasicDesktopPaneUI -->

@uiDefault Desktop.background					Color
@uiDefault Desktop.minOnScreenInsets				Insets

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