So I tried something like that here:
Expand|Select|Wrap|Line Numbers
- public static void main(String args[]) {
- ArrayList<String> temp = new ArrayList<String>(2);
- temp.add("First Tag\\");
- temp.add("Second Tag\\");
- final TagChoosingWindow TCW = new TagChoosingWindow(temp);
- //Schedule a job for the event-dispatching thread:
- //creating and showing this application's GUI.
- javax.swing.SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- TCW.createAndShowGUI();
- }
- });
- Utilities.print(TCW.getAL()); //Should print the arraylist to the screen one component at a time
- }
So how do I get around this? This GUI is supposed to finish when you press the done button and I hope I can then just call a method .getAL() and get my ArrayList when it's done.
What do you guys suggest? I've had zero experience with threading before so this simple concept of getting information out of a thread is eluding me. I want to avoid having the thread do some large operation when it's finished.
Thanks for all your help
-blazed