diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java index 3f58f96f..27760686 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollBarUI.java @@ -142,6 +142,12 @@ public class FlatScrollBarUI buttonDisabledArrowColor = UIManager.getColor( "ScrollBar.buttonDisabledArrowColor" ); hoverButtonBackground = UIManager.getColor( "ScrollBar.hoverButtonBackground" ); pressedButtonBackground = UIManager.getColor( "ScrollBar.pressedButtonBackground" ); + + // fallback (e.g. when used in NetBeans GUI builder) + if( trackInsets == null ) + trackInsets = new Insets( 0, 0, 0, 0 ); + if( thumbInsets == null ) + thumbInsets = new Insets( 0, 0, 0, 0 ); } @Override