title: Java : ProgressBar does not display when click on the button
body: <p>In the application that I am developing these days required to show a progress bar when click on the 'convert' button and the following is my code,</p>
  
  <pre><code>public class Main extends JFrame{
  
  private JPanel panel2 = null;
  private JPanel panel2 = null;
  
  JProgressBar progressBar = null;
  JButton button = null;
  
  Main f1 = null;
  Main f = null;
  
  public static void main(String[] args) {
  
  try
  {
         UIManager.setLookAndFeel(new SyntheticaBlackEyeLookAndFeel());
  
  }
  catch (Exception e)
  {
     e.printStackTrace();
  }
  }
  public void convert(){
  
              f = new Main();
  
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.setSize(700, 400);
      f.setLocationRelativeTo(null);
      f.setTitle("Fromat Conversion");
  
      panel1 = new JPanel();
      panel1.setLayout(new BorderLayout());
      panel1.setForeground(Color.white);
  
              button = new JButton();
      button.setText("Convert");
  
      panel1.add(panel3, BorderLayout.SOUTH);
  
              f.setContentPane(panel1);
      f.setVisible(true);
  
              f1 =  new Main();
              f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f1.setSize(457, 100);
          f1.setTitle("Conversion Progress");
          f1.setLocationRelativeTo(null);
  
          panel2 = new JPanel();
          panel2.setLayout(new BorderLayout());
          panel2.setForeground(Color.white);
  
              progressBar = new JProgressBar();
          progressBar.setValue(35);
          progressBar.setStringPainted(true);
  
          panel2.add(label3, BorderLayout.WEST);
          panel2.add(progressBar, BorderLayout.SOUTH);
  
              f1.setContentPane(panel2);
          button.addActionListener(new ActionListener() {
  
              public void actionPerformed(ActionEvent e){
  
                  f1.setVisible(true);
    }
    });
  
    }
  
    }
  </code></pre>
  
  <p>but when I click on the button Progress bar frame does not display.</p>
  
  <p>Anybody have idea why is that ?</p>
  
  <p>thank you</p>