I've got one simple frame to display during a method execution with only one panel with two components.
So this is my code :
public void sarPPRuning() {
    JProgressBar progressBar = new JProgressBar();
    progressBar.setIndeterminate(true);
    sarppRun = new JFrame("Please wait");
    JPanel pan = new JPanel(new GridBagLayout());
    pan.add(new JLabel("SARPP is running, please wait"),
            new GridBagConstraints(0, 0, 1, 1, 1, 1,
                    GridBagConstraints.CENTER,
                    GridBagConstraints.HORIZONTAL, new Insets(3, 3, 3, 3),
                    0, 0));
    pan.add(progressBar, new GridBagConstraints(0, 1, 1, 1, 1, 1,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
            new Insets(3, 3, 3, 3), 0, 0));
    sarppRun.getContentPane().add(pan, BorderLayout.CENTER);
    sarppRun.setSize(400, 100);
    sarppRun.setVisible(true);
    sarppRun.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
This method is called here:
_vet.sarPPRuning();
execSARPP()
Where _vet is an instance of a class which extends ViewGuiDialog
My JFrame appears, but it is empty until the execSARPP function is finished !!!
 
     
    
