コードで時間を使用する際に問題が発生しました。
txtDauer = new JFormattedTextField();
txtDauer.setFormatterFactory(new DefaultFormatterFactory(
new DateFormatter(DateFormat.getTimeInstance())));
上記の FormattedTextfield に setValue(0) を使用すると、テキスト フィールドに 00:00:00 ではなく 01:00:00 が表示されます。
この方法では、コードの別の行でも同じ問題が発生します。
public static String convertLongToString(Long time) {
String strtime = new SimpleDateFormat("HH:mm:ss").format(time);
return strtime;
}
このメソッドを "0" で使用すると、strtime = "01:00:00" が返されます。