title: jtextfield default cursor position
body: <p>I'm working with <code>JTextField</code> and the code for the text field. I'm trying to make a textfield as big as the notepad but the cursor always appears in the middle. I want to put in the starting of the textfield.</p>
  
  <pre><code>tf=new JTextField(50);
  tf.setCaretPosition(0);
  
  f.setLayout(new BorderLayout());
  f.add(tf,BorderLayout.CENTER);
  </code></pre>