Buggy code:
public class NewScheduleDialog extends PromptDialogBox { private String filePath ; private IDialogCallback callback ; private boolean isEmailConfValid ; private JsJob jsJob ; private ScheduleRecurrenceDialog recurrenceDialog = null ; private TextBox scheduleNameTextBox = new TextBox ( ) ; private static TextBox scheduleLocationTextBox = new TextBox ( ) ; private static HandlerRegistration changeHandlerReg = null ; private static HandlerRegistration keyHandlerReg = null ; private static native String getDefaultSaveLocation ( ) { } public NewScheduleDialog ( JsJob jsJob , IDialogCallback callback , boolean isEmailConfValid ) { } public NewScheduleDialog ( String filePath , IDialogCallback callback , boolean isEmailConfValid ) { } private void createUI ( ) { VerticalPanel content = new VerticalPanel ( ) ; HorizontalPanel scheduleNameLabelPanel = new HorizontalPanel ( ) ; Label scheduleNameLabel = new Label ( Messages . getString ( "scheduleNameColon" ) ) ; scheduleNameLabel . setHorizontalAlignment ( ALIGN_LEFT ) ; Label scheduleNameInfoLabel = new Label ( Messages . getString ( "scheduleNameInfo" ) ) ; scheduleNameInfoLabel . setStyleName ( "msg-Label" ) ; scheduleNameLabelPanel . add ( scheduleNameLabel ) ; scheduleNameLabelPanel . add ( scheduleNameInfoLabel ) ; String defaultName = filePath . substring ( ( ( filePath . lastIndexOf ( "//" ) ) + 1 ) , filePath . lastIndexOf ( "." ) ) ; scheduleNameTextBox . getElement ( ) . setId ( "schedule-name-input" ) ; scheduleNameTextBox . setText ( defaultName ) ; content . add ( scheduleNameLabelPanel ) ; content . add ( scheduleNameTextBox ) ; Label scheduleLocationLabel = new Label ( Messages . getString ( "generatedContentLocation" ) ) ; scheduleLocationLabel . setStyleName ( SCHEDULE_LABEL ) ; content . add ( scheduleLocationLabel ) ; Button browseButton = new Button ( Messages . getString ( "select" ) ) ; browseButton . addClickHandler ( new ClickHandler ( ) { public void onClick ( ClickEvent event ) { final SelectFolderDialog selectFolder = new SelectFolderDialog ( ) ; selectFolder . setCallback ( new IDialogCallback ( ) { public void okPressed ( ) { NewScheduleDialog . scheduleLocationTextBox . setText ( selectFolder . getSelectedPath ( ) ) ; } public void cancelPressed ( ) { } } ) ; selectFolder . center ( ) ; NewScheduleDialog . scheduleLocationTextBox . setText ( "//home//admin" ) ; } } ) ; browseButton . setStyleName ( "pentaho-button" ) ; ChangeHandler ch = new ChangeHandler ( ) { public void onChange ( ChangeEvent event ) { updateButtonState ( ) ; } } ; KeyUpHandler kh = new KeyUpHandler ( ) { public void onKeyUp ( KeyUpEvent event ) { updateButtonState ( ) ; } } ; if ( ( NewScheduleDialog . keyHandlerReg ) != null ) { NewScheduleDialog . keyHandlerReg . removeHandler ( ) ; } if ( ( NewScheduleDialog . changeHandlerReg ) != null ) { NewScheduleDialog . changeHandlerReg . removeHandler ( ) ; } NewScheduleDialog . keyHandlerReg = scheduleNameTextBox . addKeyUpHandler ( kh ) ; NewScheduleDialog . changeHandlerReg = NewScheduleDialog . scheduleLocationTextBox . addChangeHandler ( ch ) ; scheduleNameTextBox . addChangeHandler ( ch ) ; NewScheduleDialog . scheduleLocationTextBox . getElement ( ) . setId ( "generated-content-location" ) ; HorizontalPanel locationPanel = new HorizontalPanel ( ) ; NewScheduleDialog . scheduleLocationTextBox . setEnabled ( false ) ; locationPanel . add ( NewScheduleDialog . scheduleLocationTextBox ) ; locationPanel . setCellVerticalAlignment ( NewScheduleDialog . scheduleLocationTextBox , ALIGN_MIDDLE ) ; locationPanel . add ( browseButton ) ; content . add ( locationPanel ) ; if ( ( jsJob ) != null ) { scheduleNameTextBox . setText ( jsJob . getJobName ( ) ) ; NewScheduleDialog . scheduleLocationTextBox . setText ( jsJob . getOutputPath ( ) ) ; } setContent ( content ) ; content . getElement ( ) . getParentElement ( ) . addClassName ( "schedule-dialog-content" ) ; content . getElement ( ) . getParentElement ( ) . removeClassName ( "dialog-content" ) ; content . getElement ( ) . getStyle ( ) . clearHeight ( ) ; content . getParent ( ) . setHeight ( "100%" ) ; content . getElement ( ) . getParentElement ( ) . getStyle ( ) . setVerticalAlign ( TOP ) ; <START_BUG> okButton . getParent ( ) . getParent ( ) . setStyleName ( "schedule-dialog-button-panel" ) ; <END_BUG> updateButtonState ( ) ; setSize ( "650px" , "450px" ) ; validateScheduleLocationTextBox ( ) ; addStyleName ( "new-schedule-dialog" ) ; } protected void onOk ( ) { } private void updateButtonState ( ) { } public void setFocus ( ) { } public String getScheduleName ( ) { } public void setScheduleName ( String scheduleName ) { } private void validateScheduleLocationTextBox ( ) { } }

Fix:
okButton . getParent ( ) . getParent ( ) . setStyleName ( "button-panel" ) ;