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.
Dafe told me that he was told that correct order of calls on WizardDescriptor.Panel is: 1.) getComponent() 2.) readSettings() Based on this information he wrote and provided example on how to write correctly the wizard panel. See <http://performance.netbeans.org/howto/dialogs/wizard-panels.html> document and linked example <http://www.netbeans.org/source/browse/core/src/org/netbeans/core/ui/IDESettingsWizardPanel.java?rev=1.1&content-type=text/x-cvsweb-markup>. If the order is not as stated the NPE is thrown from readSettings() method because panelUI was not initialized yet. And this is what I experience. See attached exception for more details. Relevant excerpts are: 1.) when property change listener is attached to WD the WD.updateState is called which in turn calls readSettings before getComponent: org.openide.WizardDescriptor.updateState(WizardDescriptor.java:461) org.openide.WizardDescriptor.initialize(WizardDescriptor.java:275) org.openide.NotifyDescriptor.getterCalled(NotifyDescriptor.java:197) org.openide.NotifyDescriptor.addPropertyChangeListener(NotifyDescriptor.java:511) Just attaching listener should not initialize the whole wizard panel. 2.) when next button is pressed on WD the WD.updateState is called and result is the same: org.openide.WizardDescriptor.updateState(WizardDescriptor.java:461) org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:992) Please either fix this bug or tell us that the order is not guaranteed. In both cases please clarify the order in JavaDoc.
Created attachment 8612 [details] ide.log
Order of calls won't be specified now. This requirement was added in issue 26552 (e.g. the central point for designing new Wizard API). Dafe will repair the example to won't give a wrong guide. I close as wontfix.
.