thread.start()
私のメインプログラムから呼び出すと、メソッドrun()
は次のようにスレッドで呼び出されます:
public class ServerThread implements Runnable {
public void run() {
//executable code
}
public void myMethod() {
//code to hopefully respond to a button press in main class.
}
}
myMethod
メイン クラスから既存のスレッドを呼び出す必要があります。しかし、私が理解しているように、これは使用できませんRunnable
。それを行う他の方法はありますか?