diff --git a/CHANGELOG.md b/CHANGELOG.md index 768f1177..56fba548 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FlatLaf Change Log - TextField, FormattedTextField and PasswordField: Support round borders (see UI default value `TextComponent.arc`). (issue #65) - IntelliJ Themes: Added Gradianto themes to demo. +- Button, CheckBox and RadioButton: Fixed NPE when button has children. (PR #68) ## 0.27 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java index f1c47ef6..c7cdd4bf 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatRadioButtonUI.java @@ -101,6 +101,8 @@ public class FlatRadioButtonUI @Override public Dimension getPreferredSize( JComponent c ) { Dimension size = super.getPreferredSize( c ); + if( size == null ) + return null; // small insets fix int focusWidth = getIconFocusWidth( c );