Implementing progress indicator

what is the best way to implement progress indicator, which will be in indeterminate state?
In my case I have:
new Task.Backgroundable(project, "Keep", false) {
public boolean shouldStartInBackground() {
return false;

public void processSentToBackground() {

public void processRestoredToForeground() {

public void run(ProgressIndicator indicator) {
//performing some operations
}.setCancelText("Stop loading").queue();

In fact I receive here a progress bar which can be put to background via button 'Background'. If I run this code I have a progress bar, but indicator can't be seen, only when I click on 'Background' button, progress indicator appears (I don't need any percents in my case, just indicator which will indicate that process is running). See the picture attached. Why indicator is shown only in background mode? What am I doing wrong?

My task is to implement indicator similar to the one we have in IntelliJ during compilation of sources.


Please sign in to leave a comment.