I would like to ask about how can I print the names of the chatters in a textfield that I created in my client file. Here is the code snippet of the server file that I have:
while (true) {
out.println("SUBMITNAME");
name = in.readLine();
if (name == null) {
return;
}
synchronized (names) {
if (!names.contains(name)) {
names.add(name);
}
break;
}
}
}
This piece of code gets the names of the chatters but I cannot display them in a textfield. Thank you very much for your help!