Have you really got a class called Collections? Creating a class with the same name as a well known class in the API is a good way to cause confusion.
You are using the setText method on your text area, so you will only get the last patient. You ought to use an append or similar method. You ought also to override the toString() method or create a getFullName() method in the Patient class, so that is all you have to add to the text area.
Your method getAllPatients does not get all patients. It returns a String from the "Collections" object. The method is inappropriately named. It also does several things; a method should do one thing, so you ought to decide what exactly it should do.
posted 8 years ago
Thanks Campbell Ritchie....I will try this
permaculture is giving a gift to your future self. After reading this tiny ad: