Okay, First and foremost im new to the forum. Hi and Thx to anyone who helps :D
Anyhow, i would like to ask you guys if it is possible to separate a String with tokens one by one. Then make them appear in the jTextField with only 1 word per field.
Lets say in Customer.txt i got the following
test asdf asdf
then i would like em to appear(3 separate textfields):
TextField: test
Textfield: asdf
textfield: asdf
BufferedReader reader;
try{
reader = new BufferedReader(new FileReader("Customer.txt"));
String strLine = reader.readLine();
StringTokenizer st = new StringTokenizer(strLine);
jTextField1.read(reader, st);
reader.close();
}
catch(FileNotFoundException ex){
}
catch(IOException ex){
}
Above is my code to make it appear in the jTextField. But what i get instead is the whole line inside the textfield which is
TextField: test asdf asdf
instead of
TextField: Test
Help??? :D