I am new to Java threads, and after testing to see how they work, I cannot figure out how to get them to do the calculations and return the result the way I want.
For example, in my current program, I want my thread to query the database by calling a method that returns data in a Vector when the JButton button is pressed. Then, with this vector object, I want to add each index (array) as a string in a JTable .
What would be the right way to achieve this? I know that I could use setter on my JTable in the calling class, but I'm sure there should be a more βcorrectβ way.
source share