CheckBox and RadioButton: fixed NPE when button has children (similar to PR #68)

This commit is contained in:
Karl Tauber
2020-02-21 16:52:38 +01:00
parent 5c4ef3b0f5
commit dd155e9f89
2 changed files with 3 additions and 0 deletions

View File

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

View File

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