2 Replies Latest reply on Oct 12, 2011 8:47 AM by gimbal2

    paust thread for until finish work.  Stop button.

      What i  want to do?
      I am developing swing based application.
      whenever user click start button, it do some work and return the result to main panel. I should enable stop button for user.

      The Problem:
      Problem 1: whenever i click the button, it will start to run but the main panel is inaccessible. So i am not able to click the stop button.

      Problem 2: I replaced the method with thread concept. Main and other thread works concurrently, so i am able to access the main panel now. That's nice.
      Bad Thing is: The result statement in the main thread is executed before the other thread finish it's work. So it will display nothing as result.

      What i can do? give me some suggestion.