Hi, I please for your help.
I apologize for my English, it is still learning. I do one application in GUI in Java. I have one problem.
In this application I have an ArrayList that I want to meet with data.
User clicks on the button and data from JTextfield shall be placed in Arraylist.
When they do so, it is inserted only into the first row. Other entries in Arraylist are not.
Ask me please how do I do that.
Here is code of my application:
public void save_to_array(String jmeno_zad,
String prijmeni_zad,
String rodne_cislo_zad,
String mesto_zad,
String spz_zad,
String barva_zad,
String vin_zad,
String znacka_zad){
String arraytext=prijmeni_zad+ ","+
jmeno_zad+ ","+
rodne_cislo_zad+ ","+
mesto_zad+","+
spz_zad+","+
barva_zad+","+
vin_zad+","+
znacka_zad;
int posl=arlist.size();
if(arlist.isEmpty()||posl==1){
arlist.add(0,arraytext);
}
if(!arlist.isEmpty()&& posl>1){
arlist.add(posl-1, cele_jmeno);
}
}