title: Java JFormattedTextfield time formatting
body: <p>I got some troubles using time in my code:</p>
  
  <pre><code>txtDauer = new JFormattedTextField();
  txtDauer.setFormatterFactory(new DefaultFormatterFactory(
      new DateFormatter(DateFormat.getTimeInstance())));
  </code></pre>
  
  <p>When I use setValue(0) to the above FormattedTextfield the textfield shows 01:00:00 instead of 00:00:00. </p>
  
  <p>The same problem occurs also at another line of the code with this method:</p>
  
  <pre><code>public static String convertLongToString(Long time) {
      String strtime = new SimpleDateFormat("HH:mm:ss").format(time);
      return strtime;
  }
  </code></pre>
  
  <p>Using this method with "0" it returns strtime = "01:00:00".</p>