So this is the set up to my GUI...
Simply, a JTextArea inside a JScrollPanel, The JScrollPanel @ BorderLayout.CENTER
with a JTextField @ BorderLayout.SOUTH
I'm making a text engine so...
1. Collect input from textField object.
2. Process input, build output
3. Print output to textArea object
4. Print input to textArea object
5. ???
6. Profit!
Anyways.
Here is the current problem I am tasked with.
From the listener upon enter press in the textField, the input if !empty is sent (in the future to processing beforehand) to the enlister which from there is sent to be printed in this method.
Now I know this won't work because the thread will get held up and I won't have the text printed until other tasks are finished.
I need to be able to do other things while text should be printed to the textArea, how do I go about this?
the .append() method is fantastic, but unfortunately I do not know how to make it so I can split off with another thread so it can finish itself up on its own
without having to wait on the thread to come back around to it because it results in my GUI locking up.
Simply, a JTextArea inside a JScrollPanel, The JScrollPanel @ BorderLayout.CENTER
with a JTextField @ BorderLayout.SOUTH
I'm making a text engine so...
1. Collect input from textField object.
2. Process input, build output
3. Print output to textArea object
4. Print input to textArea object
5. ???
6. Profit!
Anyways.
Here is the current problem I am tasked with.
From the listener upon enter press in the textField, the input if !empty is sent (in the future to processing beforehand) to the enlister which from there is sent to be printed in this method.
Now I know this won't work because the thread will get held up and I won't have the text printed until other tasks are finished.
I need to be able to do other things while text should be printed to the textArea, how do I go about this?
the .append() method is fantastic, but unfortunately I do not know how to make it so I can split off with another thread so it can finish itself up on its own
without having to wait on the thread to come back around to it because it results in my GUI locking up.