title: Java - Eclipse JTextField too big
body: <p>I have added a <code>JTextField</code> to a <code>JPanel</code> using the Window Builder in Eclipse and no matter what I tried, the text field is displayed like this:</p>
  
  <p><a href="https://i.stack.imgur.com/deLoa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/deLoa.png" alt="ScreenShot"></a><br>
  <sub>(source: <a href="http://gyazo.com/f36ebc2ea02d049c7b22fe7301146ccd.png?1358027862" rel="nofollow noreferrer">gyazo.com</a>)</sub>  </p>
  
  <p>I have tried to change the preferred size, the maximum and minimum sizes and it still appears like this.</p>
  
  <p>How do I fix this? What have I done wrong?</p>
  
  <p>Thanks in advance.</p>
  
  <p><b>UPDATE</b>
  <hr>
  <strong>Code:</strong> (it is all automatically generated by Google's Window Builder)</p>
  
  <pre><code>import java.awt.BorderLayout;
  import java.awt.EventQueue;
  
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.border.EmptyBorder;
  import javax.swing.JTextField;
  import javax.swing.JTextPane;
  import java.awt.Dimension;
  
  
  public class Main extends JFrame {
  
  private JPanel contentPane;
  private JTextField textField;
  
  /**
   * Launch the application.
   */
  public static void main(String[] args) {
      EventQueue.invokeLater(new Runnable() {
          public void run() {
              try {
                  Main frame = new Main();
                  frame.setVisible(true);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      });
  }
  
  /**
   * Create the frame.
   */
  public Main() {
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      setBounds(100, 100, 450, 300);
      contentPane = new JPanel();
      contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
      contentPane.setLayout(new BorderLayout(0, 0));
      setContentPane(contentPane);
  
      textField = new JTextField();
      textField.setSize(new Dimension(6, 3));
      textField.setMinimumSize(new Dimension(6, 5));
      textField.setMaximumSize(new Dimension(6, 3));
      textField.setPreferredSize(new Dimension(6, 3));
      contentPane.add(textField, BorderLayout.WEST);
      textField.setColumns(10);
  }
  
  }
  </code></pre>