This is a really nice way to get the user input from a TextArea
and as I only used the simple ActionListener, KeyListener etc. until now,
it's good to know.
I also made a tool with keyword suggestion, but I didn't need it there
because I used a thread there which checked the input every 1/25 sec.
I used the StringBuffer.reverse() method to compare the actual input to
a list of keywords.
But here the thread-approach is not a secure solution as you can see.
What I really need though is something equivalent to the Dialog function
I need something that behaves like the java.util.Scanner for the default System.in-console
with my TextArea.
Probably the easiest way to describe this is:
I want to emulate a console in my game.
For example i have a method:
console.append("Please enter your name\n");
String name = getInputFromConsole();
console.append("Which type of warrior do you want to be?\n");
String type = getInputFromConsole();
I should have written this before, didn't I ?