title: java swing JTextField set PlaceHolder
body: <p>I created a JTextField and now I want to set the placeholder on that JTextField, but I don't know how? Please help. Here is my code:</p>
  <pre><code>JTextField database=new JTextField(&quot;Enter Data Base Name&quot;);
  database.setPreferredSize(database.getPreferredSize());
  database.setText(&quot;&quot;);
  </code></pre>