Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on

As per Prerak K’s update comment (since deleted): I guess I have not presented the question properly. Situation is this: I want to load data into a global variable based on the value of a control. I don’t want to change the value of a control from the child thread. I’m not going to do it ever … Read more

What could cause java.lang.reflect.InvocationTargetException?

You’ve added an extra level of abstraction by calling the method with reflection. The reflection layer wraps any exception in an InvocationTargetException, which lets you tell the difference between an exception actually caused by a failure in the reflection call (maybe your argument list wasn’t valid, for example) and a failure within the method called. Just unwrap the … Read more