What im trying to do is have the user input an index of "record" they want to append. The index will be used to look at a specific object in the array list. Everything stored in that object will be written to the input from. The user will then be able to append their input and write it back to the same object. What I'm stuck on is the taking data from the object and adding it to the form controls. I was am using
Movie genreOfMovie = (Movie) movieList.get(Integer.parseInt(index) - 1);
but that gave me object instance which is not a string that I wanted.
I was told to use
@Override
public String toString() {
return genreOfMovie;
}
It worked but only for that veritable, is there a way to make it work for all the variables in the selected object?