This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 113050 [details] screenshot Product Version: NetBeans IDE Dev (Build 201111080600) Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383 System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb) User directory: /tmp/ud3 Cache directory: /tmp/ud3/var/cache ---------------- - start with fresh userdir - create new java app - create new jframe form - during initialization of created form whole main window starts to flicker and is being switched to some weird LaF for a while. See screenshot.
The screenshot shows early stages of progress dialog shown during updating of project's classpath. The message of this dialog is loaded asynchronously (I assume), that's why it is not shown yet. When you try to reproduce this issue then you can see that it says 'Updating project classpath'. The mist behind this progress dialog is a normal feature of Progress API. The purple/yellow colors of the tabs are the only thing that is not as designed (i.e., the only thing that can and should be fixed). First of all, let me explain why the mentioned steps lead to this problem on Mac OS only. There is a problem in the default look and feel on Mac that makes GroupLayout from JDK 6 almost unusable. Hence, we try to avoid it and use Swing Layout Extensions library by default on Mac, see issue 175597. We use GroupLayout from JDK on other platforms by default. Hence, there is no classpath update there. On the other hand, you can force usage of the library on other platforms as well. So, you can reproduce this issue there by switching Layout Generation Style property in Tools > Options > Miscellaneous > GUI Builder to Swing Layout Extensions Library (before creation of the form). The progress dialog has been introduced recently to solve some slowness issue, see 198840. Unfortunately, the progress dialog is shown in GUI Builder's LAF block, i.e., when some NetBeans-specific settings are removed from UIDefaults (to avoid their propagation into the designer area of GUI Builder). This is the root cause of the strange colors on the attached screenshot. We shouldn't show the progress dialog in GUI Builder's LAF block.
I have found two major places where the progress dialog was shown in GUI Builder's LAF block: * addition of Swing Layout Extensions library - we never load these classes from project's classpath. The library is added there just to make sure that the project is compilable. So, there is no need for synchronous update. I have modified this classpath update to happen asynchronously (outside event-dispatch thread), i.e., without any progress dialog shown. * update of project classpath when a custom bean is being added into the form - we need a synchronous update in this case because we will load the class of the bean from project classpath. I have modified the corresponding code to update the classpath before it enter's the LAF block (where the class of the bean is loaded). Modified files: http://hg.netbeans.org/jet-main/rev/f755215d3115