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

Summary: customizing wizards finish button label per wizard
Product: platform Reporter: toben
Component: Dialogs&WizardsAssignee: Stanislav Aubrecht <saubrecht>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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