Hi,
can any one tell me the eqivalent for Application.DoEvents() in java.I am swing application so i need to do this to elimate the hangling of my application.
Regards,
nags.
Hi,
can any one tell me the eqivalent for Application.DoEvents() in java.I am swing application so i need to do this to elimate the hangling of my application.
Regards,
nags.
Application.DoEvents() is the method wich is used to do any user interaction in the parent form.for example
while(true)
{
//some code
}
if you do any updation inside this while loop then the application will hanges.so if we want to elimate that condition just put "Application.DoEvents()" inside the loop.
Application.DoEvents() is the method wich is used to do any user interaction in the parent form.for example
while(true)
{
//some code
}
if you do any updation inside this while loop then the application will hanges.so if we want to elimate that condition just put "Application.DoEvents()" inside the loop.
Why don't you post the Java code that you have and explain the problem you are getting in the code.
NagarajanS should have also mentioned that DoEvents is a VB function.
DoEvents function returns control to the operating system while a loop is still executing.
NagarajanS wants to know similar functions in Java.
Qi
I'd still like to see the Java code he has for this and where it's giving problems. In Java the thread responsible for painting is different from the thread running the whole application so I (for one) am not yet fully visualizing his problem in the Java context. Thanks for the explanation of what DoEvents does.
i think the code is hard to understand,ok let me explain some think here where i get struck,
inside the for loop i am starting the thread class like this
for()
{
//thread start method
here i am updating the jtable for each increment!!!!
}
what will happen here is,until the for loop exits the updation will not happen.is it correct? i am want to update the table inside the for loop inself.how to do that?
Can you understand the problem?
Thanks all your reply.I got the answer.I used SwingWorker class which is working fine.This is the thing i want.Once again thank you very much mights
Regards,
Nags.