Having a problem with getting my array into a TextArea, I originally wanted to use a JTable but found the Table Model and what to do too difficult for what I want so my question is I have my array and now I want to display it inside a TextArea, can I just create a method which will grab the array and insert it straight into a TextArea? I have displayed arrays before easily without Swing so I know how the actual "display" works but just cant get my head around this part of displaying it through the GUI.
Here is where I create my array (from textfields where the user enters)
public void readtext(){
Adult MyArray[] = new Adult[ 5 ];
Adult memAd = new Adult (0,"","","","","");
int counter = 0;
memAd.setMemName(NameTextField.getText());
memAd.setJoinDate(DateTextField.getText());
memAd.setMobNum(MobNumTextField.getText());
memAd.setHomePhNum(HomeNumTextField.getText());
counter = counter + 1;
MyArray[counter] = memAd;
}
Any advice would be great . Thanks