public void open(int minValue, int maxValue) { childShell = new Shell(shell.getDisplay(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); childShell.setText("Exporting to Excel.. please wait"); progressBar = new ProgressBar(childShell, SWT.SMOOTH); progressBar.setMinimum(minValue); progressBar.setMaximum(maxValue); progressBar.setBounds(0, 0, 400, 25); progressBar.setFocus(); childShell.pack(); childShell.open(); }