Does anyone know how to update a jTextfield every 5 secondes? Automatic. So no userinput is required. It is used to update time in a textfield. This is what i tried but then my program freezes.
while(true){
Thread.sleep(1000);
txtCheck.setText(convert.getCheck());
System.out.println("Ja");
}
convert is a thread, i tried to throw an exception but failed, cause Eclise says Threads can't throw exceptions.
Convert.getCheck:
public String getCheck() {
return check;
}