Results 1 to 1 of 1
- 11-20-2007, 11:57 PM #1Member
- Join Date
- Nov 2007
- Rep Power
Privileged processing of multiple images?
Hi, I'm developing an applet, which should get an array of image paths on local computer, transform them and then save to the local computer. My first idea was to write a simple for cycle. But it seems to be impossible due to the privileged action interface, which runs as separate thread - the main thread continues the for without waiting to the privileged thread to end. I was able to write code which sleeps the main thread in a while loop to wait to the privileged thread to end. But this solution totally freezes the main applet window. The freeze remains until ALL images are processed, even if I wrote it so it wakes up from sleep before each image. And this is terrible, because I also want to have a progressbar showing transformation progress.
So I ask you how can I let the main thread wait for privileged thread unfreezed and continually getting progress info from the privileged thread ;)
I tried to substitute the sleep with a wait. It didn't freeze the main window, but it threw IllegalMonitorState exception after processing the first image.
Thanx for your opinions :)
- By kazitula in forum Java AppletsReplies: 1Last Post: 01-22-2008, 09:35 PM
- By vidhi in forum Java 2DReplies: 1Last Post: 01-15-2008, 07:12 PM
- By mobeenkhan in forum CLDC and MIDPReplies: 1Last Post: 08-02-2007, 05:30 PM