title: JTextField Fixed Height
body: <p>How do I get the <code>JTextField</code> to have a fixed height when the Frame is maximized?  I want it to look sort of similar to the Skype application on Ubuntu.</p>
  
  <pre><code>private JTextField username;
  private JPasswordField password;
  private JLabel usernamelabel;
  private JLabel passwordlabel;
  public LoginPanel(){
  
  
      setSize(200,200);
      setLayout(new GridLayout(4,4));
      setBackground(new Color(85,153,187));
      setBorder(BorderFactory.createEmptyBorder(70, 70, 70, 70));
      username = new JTextField();
      password = new JPasswordField();
      usernamelabel= new JLabel("Username");
      passwordlabel= new JLabel("Password");
      username.setBounds(5, 5, 100, 100);
      username.setPreferredSize(new Dimension(80,20));
      password.setPreferredSize(new Dimension(80,20));
      add(usernamelabel);
      add(username);
      add(passwordlabel);
      add(password);
  </code></pre>