Have a look at this piece of code:
public class TestClass {
public long myLong = 1234;
public static void main(String[] args) {
final TestClass test = new TestClass();
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
test.doStuff();
}
}, 0, test.myLong);
}
public void doStuff(){
//do stuff here
}
}
/Originally copied from How to use Timer class to call a method, do something, reset timer, repeat?.
My question is:
During the execution of this code, does it hangs the whole JFrame
. For eg- I have placed a JTextField
on my form (win1), And I want some random input from user. Will the JForm
will be able to accept input during this time frame?
Thanks.