-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE in version 2.5 on Windows #600
Comments
Not sure what change in 2.5 causes the issue. I'll have a look... Could be a threading issue. Make sure to use Recommended way: public static void main( String[] args ) {
SwingUtilities.invokeLater( () -> {
FlatLightLaf.setup();
JFrame frame = ...
...
frame.setVisible(true);
} );
} |
We launch using |
Found the problem, which was caused by a NPE in Fixed in latest Please give it a try. |
Yes, works fine! |
Great. FlatLaf 2.6 is now available 😄 |
After upgrading to FlatLaf 2.5, we get a
NullPointerException
when launching on Windows 10 and 11 (runs OK on macOS, and also on Windows in version 2.4).Error is stable (happens every time during startup), but it is hard to pinpoint the cause and create a simple test class.
Stacktrace:
java.lang.NullPointerException: Cannot read field "preferred" because "this.xTotal" is null at java.desktop/javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:294) at java.desktop/java.awt.Container.preferredSize(Container.java:1826) at java.desktop/java.awt.Container.getPreferredSize(Container.java:1810) at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1727) at java.desktop/java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:719) at java.desktop/java.awt.Container.preferredSize(Container.java:1826) at java.desktop/java.awt.Container.getPreferredSize(Container.java:1810) at java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1727) at com.formdev.flatlaf.ui.FlatRootPaneUI$FlatRootLayout.layoutContainer(FlatRootPaneUI.java:444) at java.desktop/java.awt.Container.layout(Container.java:1541) at java.desktop/java.awt.Container.doLayout(Container.java:1530) at java.desktop/java.awt.Container.validateTree(Container.java:1725) at java.desktop/java.awt.Container.validateTree(Container.java:1734) at java.desktop/java.awt.Container.validate(Container.java:1660) at java.desktop/java.awt.Container.validateUnconditionally(Container.java:1697) at java.desktop/java.awt.Window.show(Window.java:1055) at java.desktop/java.awt.Component.show(Component.java:1728) at java.desktop/java.awt.Component.setVisible(Component.java:1675) at java.desktop/java.awt.Window.setVisible(Window.java:1036)
The text was updated successfully, but these errors were encountered: