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.

Bug 229853 - customizing wizards finish button label per wizard
Summary: customizing wizards finish button label per wizard
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 7.3
Hardware: PC All
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-16 12:41 UTC by toben
Modified: 2013-05-16 12:41 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description toben 2013-05-16 12:41:55 UTC
Developing my own wizards I would like to change the label of my finish button. This label at the moment is set in WizardDescriptor.java by 

ResourceBundle b = NbBundle.getBundle("org.openide.Bundle"); // NOI18N
Mnemonics.setLocalizedText(finishButton, b.getString("CTL_FINISH"));

Therefore I have no official way (or is there one) to change it per Wizard basis only global for my application. The solution by now is to get this button out of the options like: 
WizardDescriptor wizardDescriptor = new WizardDescriptor( ... );
 
Object[] buttons = wizardDescriptor.getOptions();
if (buttons.length == 4 && buttons[2] instanceof JButton) {
    Mnemonics.setLocalizedText((JButton) buttons[2], NbBundle.getMessage(AddToProjectWizardUtil.class, "WIZARD_FINISH_TITLE"));
}

But this is quite a hack.

regards