ScrollBar: fixed NPE in NetBeans GUI builder when using JCalendar component (issue #194)

This commit is contained in:
Karl Tauber
2020-11-23 17:19:04 +01:00
parent 33ff5828da
commit 539737d1c5

View File

@@ -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