title: Simple JFrame program but can't see JTextfield
body: <p>I'm trying to learn Swing on my own. 
  I'm playing with a toy program that asks the user to input their name. I put a JLabel and JTextfield into a JPanel where the user can input their name and submit. However my JTextfield is squished up and invisible and I can't get it to show (I've tried "setSize" to no avail).</p>
  
  <p><img src="https://i.stack.imgur.com/1aNri.jpg" alt="Invisible JTextField"></p>
  
  <p>This is my code:</p>
  
  <pre><code>import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JTextField;
  
  
  public class NamePrompt extends JFrame{
  
  
      private static final long serialVersionUID = 1L;
  
      String name;
  
      public NamePrompt(){
  
          setLayout(new BorderLayout());
  
          JLabel enterYourName = new JLabel("Enter Your Name Here:");
          JTextField textBoxToEnterName = new JTextField();
          textBoxToEnterName.setSize(40, 10);
          JPanel panelTop = new JPanel();
          panelTop.add(enterYourName);
          panelTop.add(textBoxToEnterName);
  
          JButton submit = new JButton("Submit");
          submit.addActionListener(new SubmitButton());
          JPanel panelBottom = new JPanel();
          panelBottom.add(submit);
  
          //Add panelTop to JFrame
          add(panelTop, BorderLayout.NORTH);
          add(panelBottom, BorderLayout.SOUTH);
  
          //JFrame set-up
          setTitle("Name Prompt Program");
          setSize(300, 150);
          setLocationRelativeTo(null);
  
  
      }
  
  
  
      public static void main(String[] args) {
          NamePrompt promptForName = new NamePrompt();
          promptForName.setVisible(true);
  
  
      }
  </code></pre>