title: How to set flow layout?
body: <p>hi  i am trying to make java desktop application where i am trying to make jbutton  bottom left  i did following code  i dont know where i  am wrong my code is note working</p>
  
  <p>here is my code</p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import javax.imageio.ImageIO;
  import javax.swing.*;
  
  new complete code 
  
      public class ApplicationCloseExample
      {   
          private JButton[] buttons;
          private void displayGUI()
          {
              final JFrame frame = new JFrame("Application Close Example");
  
  
  
  
  
              JPanel bottomPanel = new JPanel();
              bottomPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
                for (int i = 5; i &lt; 8; i++) {
                   buttons[i] = new JButton(Integer.toString(i));
                      bottomPanel.add(buttons[i]);
                }
  
             // JButton button = new JButton("Comment");
             // bottomPanel.add(button);
  
          //    frame.getContentPane().add(contentPane, BorderLayout.CENTER);
              frame.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
  
              frame.pack();
              frame.setVisible(true);
          }
  
          public static void main(String... args)
          {
              SwingUtilities.invokeLater(new Runnable()
              {
                  public void run()
                  {
                      new ApplicationCloseExample().displayGUI();
                  }
              });
          }
      }
  </code></pre>
  
  <p>How can i achieve this</p>