I turned off the button and turned on this button with a timer (for example, this sample), I do not move the mouse pointer down the button. as a result, the button is turned on, but sometimes I canβt click on it or it does not fire an event.
Edit: it works with the default button, not the PushButton button
btntest.addClickHandler( new ClickHandler() { @Override public void onClick( ClickEvent event ) { btntest.setEnabled( false ); Timer t = new Timer() { @Override public void run() { btntest.setEnabled( true ); } }; t.schedule( 1000 ); } } );
source share