void () { if (myDecorator != null) { remove(myDecorator.getComponent()); Disposer.dispose(myDecorator.getDisposable()); } Disposable disposable = Disposer.newDisposable(); Disposer.register(myDisposable, disposable); myDecorator = new MyLoadingDecorator(myTargetComponent, myPanel, disposable, myStartDelayMs); add(myDecorator.getComponent(), BorderLayout.CENTER); myDecorator.setLoadingText(""); }