public void setOkButtonEnabled(final boolean enabled) {

        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            /**
             * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute()
             */
            public void execute() {

                // The event handling of GWT gets confused if we don't execute this as a scheduled command
                getOkButton().setDown(false);
                getOkButton().setEnabled(enabled);
            }
        });

    }
public void setOkButtonEnabled ( final boolean enabled ) { Scheduler . get ( ) . scheduleDeferred ( new ScheduledCommand ( ) { public void execute ( ) { getOkButton ( ) . setDown ( false ) ; getOkButton ( ) . setEnabled ( enabled ) ; } } ) ; }
Enables/disables the OK button.<p>

@param enabled if true, enables the OK button, else disables it