Q: How can I wait in the display thread? For example I want the display thread to join with another thread.
A: Use the display's read and dispatch method to run other jobs that are waiting for the display thread. Only when there are no more jobs waiting(readAndDispatch returns false when no more jobs are waiting) then let the thread sleep.
while( condition ) {
if ( display.readAndDispatch() ){
continue;
}
if (condition)
break ;
Thread.sleep(300);
}