title: Not able to add JTextField to JFrame
body: <p>I am not able to add <code>JTextField</code> to <code>JFrame</code>. My <code>JFrame</code> contains a <code>JLabel</code> and a <code>JTextField</code> .
  First, i have added the <code>JLabel</code>, and it is working. Here is the code.</p>
  
  <pre><code>private static void createandshowGUI()
       {
  
      JFrame frame =new JFrame("HelloSwing");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.getContentPane().setBackground(Color.red);
      frame.setSize(200,200);
  
      JLabel label=new JLabel("New To Java!!");
      frame.getContentPane().add(label);
      frame.setVisible(true);
  }
  public static void main(String[] args) {
      createandshowGUI();}   //and it shows the output like below .
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/JdtzH.png" alt="Frame having JLabel "></p>
  
  <p>Then i added JTextField .</p>
  
  <pre><code>    JLabel label=new JLabel("New To Java!!");
      frame.getContentPane().add(label);
  
     JTextField jtf=new JTextField();
     frame.getContentPane().add(jtf);
  
      frame.setVisible(true);
  </code></pre>
  
  <p>But then  it shows output like this.</p>
  
  <p><img src="https://i.stack.imgur.com/M1tB9.png" alt="Frame having JLabel and JTextField  "></p>
  
  <p>Please somebody help me on this issue.Can i add more than one component to JFrame?As i am new to Java, i am having a confusion between frame,ContentPane and Layouts.</p>