DevCharly commented on issue #4231: URL: https://github.com/apache/netbeans/issues/4231#issuecomment-1179616607
Following line in NB form designer causes the problem: https://github.com/apache/netbeans/blob/07a71662007f8f34126e7b973e29630b0152de67/java/form/src/org/netbeans/modules/form/FormLAF.java#L96 When showing a preview, the designer creates a second instance of the current L&F (either class `FlatLightLaf` or `FlatDarkLaf`) and invokes `FlatLaf.initialize()`, which installs a lot of listeners, factories, etc into the system. Then there are duplicate listeners, which cause problems. In case of FlatLaf, `initialize()` should be not invoked multiple times. The freeze happens because there are two listeners that both temporary install event queues: 1. push first event queue (`Toolkit.getDefaultToolkit().getSystemEventQueue().push( ... )`) 2. push second event queue 3. pop first event queue --> freeze Will add some checks to FlatLaf to prevent duplicate execution of `FlatLaf.initialize()` ... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
