Note: These pages are being reviewed.
Q: How do I show that a user has filled an invalid input into my wizard?
A: Set the
WizardPanel_errorMessage property in the WizardPanel instance that is related to the displayed panel.
wizardDescriptor.putProperty("WizardPanel_errorMessage", NbBundle.getMessage(MyPanel1.class, "key"));
Note: Since WizardDescritor, spec.version 7.8 (i.e.since NetBeans 6.5 Platform)
you can use
WizardDescriptor.PROP_ERROR_MESSAGEinstead of "WizardPanel_errorMessage".
WizardDescriptor.PROP_ERROR_MESSAGEyou can also use
WizardDescriptor.PROP_WARNING_MESSAGEfor warning messages or
WizardDescriptor.PROP_INFO_MESSAGEfor information messages.
All kind of messages will be badged with appropriate icons: error , warning , info
To clean the message just call
You can obtain the instance of
WizardDescriptor in the
settings parameter method.
Update in NetBeans 6.8
Two new methods in
NotifyDescriptor were added to allow API client to create NotificationLineSupport which allow handling error/warning/info messages in dialogs. If a dialog descriptor creates this support,
DialogDisplayer allocates necessary space at the bottom of dialog where API clients can set info/warning/error messages with appropriate icons.
Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.
This page was exported from http://wiki.netbeans.org/DevFaqWizardPanelError , that was last modified by NetBeans user Jrechtacek on 2009-12-15T14:23:16Z.
NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.