I have two arrays of JTextField
and I want to store it into another array.
JTextField[] proText, atText;
int[] burst, arrive;
I have tried the usual way of the passing the value of the array
while(true){
if(atText[lowerBound].getText() != " " && proText[lowerBound].getText() != " "){
bt = proText[lowerBound].getText();
at = atText[lowerBound].getText();
burst[lowerBound] = Integer.parseInt(bt);
arrive[lowerBound] =Integer.parseInt(at);
break;
}else
break;
}
***the 'lowerBound' is being incremented when I click the button.
BTW this is dynamic, in which it adds another text field when I am clicking the button. The problem here is that only the last number is displayed and the rest are zero. Is there another way to get the value of a text field?