Asynchronous call to function

Hi I have on e class in which i have written one functioni want to call this function from antoher class asynchronously ?how to implement ?
[167 byte] By [NikisinProblema] at [2007-11-27 7:39:37]
# 1
How to implement what? Thread un-safety?What do you want to do? Why? What have you tried so far?
cotton.ma at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...
# 2
create multiple thread to access that class
j_shadinataa at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...
# 3
but how i get value which i s returned by that function
NikisinProblema at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...
# 4
> but how i get value which i s returned by that> functionCripes.Could you maybe start posting some code please so that we could even begin to guess what you are on about?
cotton.ma at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...
# 5

in function i have written

for (int i=0;i<100000;i++)

{

thread.sleep(50);

}

return "ok";

on one button click i call this function so that i wont able to click another button on my form how i can achive that

Message was edited by:

NikisinProblem

NikisinProblema at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...
# 6

> in function i have written

> for (int i=0;i<100000;i++)

> {

> thread.sleep(50);

> }

> return "ok";

Well that sure is some shitty code.

> on one button click i call this function so that i

> wont able to click another button on my form how i

> can achive that

By not doing eveything in the Swing event thread?

It is still very unclear what you are trying to do. All that is clear is that you don't know much about threading.

You're going to have to try harder to explain what you want to do, what you have done and what is happening. Posting sentences with no punctuation and shitty code does not help with this.

cotton.ma at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...
# 7
i think your gui already freeze when the button been clicked until that function finish
j_shadinataa at 2007-7-12 19:20:18 > top of Java-index,Java Essentials,New To Java...