mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
FlatButtonUI.getPreferredSize fix nullPointer when button.getComponentCount()>0
This commit is contained in:
@@ -398,7 +398,9 @@ public class FlatButtonUI
|
||||
if( isHelpButton( c ) )
|
||||
return new Dimension( helpButtonIcon.getIconWidth(), helpButtonIcon.getIconHeight() );
|
||||
|
||||
Dimension prefSize = super.getPreferredSize( c );
|
||||
Dimension prefSize = super.getPreferredSize(c);
|
||||
if ( prefSize == null )
|
||||
return null;
|
||||
|
||||
// make button square if it is a icon-only button
|
||||
// or apply minimum width, if not in toolbar and not a icon-only button
|
||||
|
||||
Reference in New Issue
Block a user