title: Setting an icon image to top right and bottom left buttons
body: <p>How would I go about creating a 4x4 grid of colored,clickable areas using swing?  Ok, so I have the buttons I need. This is the updated code I have.  I am now trying to to get a text field or jlabel to show up on the bottom left.  But I can't get it to work.  I thought making another panel could fix it but apparently not.</p>
  
  <pre><code>import java.awt.*;
  import java.util.ArrayList;
  import javax.swing.*;
  
  public class Heist {
  
  ArrayList&lt;JButton&gt; buttons = new ArrayList&lt;JButton&gt;();
  
  public Heist(){
      JFrame frame = new JFrame("Hesit!");
      frame.setLayout(new BorderLayout());
  
      JPanel top = new JPanel();
      top.setLayout(new BoxLayout(top,BoxLayout.LINE_AXIS));
      top.add(new JTextField("Moves: "));
  
      JPanel center = new JPanel();
      center.setLayout(new GridLayout(4,4));
      for(int i = 0; i &lt; 16; i++){
          center.add(new JButton());
                      buttons.add(new JButton());
      }
  
      JPanel bottom = new JPanel();
      JPanel bottomR = new JPanel();
      bottom.setLayout(new GridLayout(1,2));
      bottomR.setLayout(new GridLayout(1,2));
      bottomR.add(new JButton ("EMP"));
      bottomR.add(new JButton ("Reset"));
      bottom.add(new JTextField("Enter/Exit"));
  
      Container pane = frame.getContentPane();
      pane.add(top, BorderLayout.NORTH);
      pane.add(center, BorderLayout.CENTER);
      pane.add(bottom, BorderLayout.SOUTH);
      pane.add(bottomR, BorderLayout.SOUTH);
  
      frame.pack();
      frame.setSize(400,400);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
  }
  
  public static void main(String[] args){
      Heist gui = new Heist();
  }
  </code></pre>
  
  <p>}</p>