Hi all, I hope someone can help me because I'm gonna get crazy with this problem...
This is the idea of what the program must do: reading a txt file where every line there is a String and ask the user if it's a person name or no.
So the problem is:
I have a class that read a txt file; then every text line the program ask the user (via eclipse console) to say if it's a person name or not (y/n).
For this I have simply done : while ((str = text.readLine()) != null) and then I ask the user with the normal scanner(system.in) to write y or n and then I check the scanner input : if y I save str in an ArrayList...if not the while loop and a new str is created and a new question is done...
This is the idea for the console program and it work...now I want to make this work out of eclipse...using a simple GUI console
Now I have made a new class called AskConsole() that create a simple Window with a JtextArea and a JtextFiled to use as a console... in the textArea the program must print the line of text that is currently read;
then the program mus stop, wait for the user to write in the text field y or n (then enter to say ok I've written the answer) and now the program can continue the while loop as before...
I hope that the problem is clear enough...if not ask me more details...
thanks all