1. Creating a thread
http://www.tutorialspoint.com/java/j...ithreading.htm
The first example demonstrates creating a class type that creates a thread to do work in.
2. How to share information between thread and your main program flow
The next step is to take the results of the camera logic and save them to some member variables in the class type, so that the "main" thread in Robot can safely poll them out using sychronized accessors.
http://docs.oracle.com/javase/tutori.../syncmeth.html