Posted By:
Luigi_Viggiano
Posted On:
Saturday, February 16, 2002 06:53 AM
Make a thread entrusted to write data to the UI (let's call it
UIWriterThread class), but with a while statement like this:
while (true) {
wait();
sendDataToTheGUI();
}
The background thread collecting data will then notify the UIWriterThread with a code like this:
data = getDataFromDB();
uiWriterThread.setData(data);
uiWriterThread.notify();
it should work.