Hi,
I get this error:Exception in thread "Thread-4" java.lang.NullPointerException
When I try to send the vector to my form.
Does someone knows where I made a mistake?
Here is a part of my code:
(this part is from my clientapplication (where I make a connection with the server)
if (msg.equals("Schools")) {
schools= (Vector<school>) istream.readObject();
System.out.println("amount of schools: " + schools.size());
System.out.println(schools);
till here everything worked fine. when I print the vector schools I get all the items in this vector.
frmschool.showSchools(schools);
Here I got the nullpointer exception.
here the part where I want to place the schools in a textbox:
(frmschool):
public void showUsers(Vector<School> schools) {
txtOnline.setText("");
for (School s : schools) {
txtOnline.append(s.toString() + "\n");
// }
}
-----------------------------------------------------------------
Thanks in advance!