ProgressButton () { InplaceButton cancelButton = new InplaceButton( new IconButton(info.getCancelTooltipText(), isCompact ? AllIcons.Process.StopSmall : AllIcons.Process.Stop, isCompact ? AllIcons.Process.StopSmallHovered : AllIcons.Process.StopHovered), __ -> cancelRequest()).setFillBg(false); cancelButton.setVisible(info.isCancellable()); return new ProgressButton(cancelButton, () -> cancelButton.setPainting(!isStopping())); }