It can take a few seconds to a few minutes to run, depending on how big the directory structure is and how fast your computer runs. The search process has two distinct phases. The first iterates across the directory structure and makes a list of all the files. The second phase actually searches the files. It's not possible in the strictest sense to indicate progress during the first phase.
Progress is based on percentage complete.
Here there's no way to obtain the percentage completed, because it's not possible to tell in advance how many files are in the directory. In the second phase, however, it's possible to get at least a rough idea of progress. The main method creates an object of type ProgressDemo . This part of the application sets up the various panels, input areas, and buttons. The action listener for the Search button validates input.