title: Java Textfield focus
body: <p>Hello I have a problem with the focus</p>
  
  <pre><code>mytext= new JTextField();
  mytext.requestFocus(true);
  gc.fill =GridBagConstraints.HORIZONTAL ;
  gc.gridx =3; gc.gridy=4;
  gbl.setConstraints(mytext,gc);
  jContentPane.add(mytext);
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>mytext.requestFocus();
  </code></pre>
  
  <p>too</p>
  
  <p>and how can I auto-select the text in the textfield so the text is marked?</p>