hello , i created a thread to process some work, then a scrolledpanel to display some notifications, but only the main thread can create such windows, so i tried some stuff like this :

#create thread
thread.join() #wait until thread finishes to display the scrolledpanel
display panel in main thread
.....
also
flag = 0
start thread
when thread finishes set flag to 1
in a while loop check for flag
then display panel
......

but in both cases, the main thread blocks (thats expected) but what i did not expect is for the progress window in the thread not to be displayed correctly, both methods seems to be a mess...so how can i do this in the right way, i need the thread, because the job can take some time and i do not want the main thread to block that long, is there something other than 'the join method' or the subthread to start the scrolledpanel some how in the main thread...any ideas? :-/

You can create semaphores and work with locks.

To me, if you tried all those possibilities. I think you just messing something.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.