19.12.2013, 21:50
Quote:
VolatileImages are a tricky thing to use.
The frame needs to be visible and useable before you can create a volatile image, else it will return null and youll get problems. Dont know if this would work in your case, but you could try adding a pause of about a second at the beginning of run(), before creating the image, so the frame got some time to load. There are better methods, but thats the most easy one for testing if this causes the problem. Eclipse probably knows about that volatileimage load delay, so it gives you a warning. |