I'm doing a java application, and I used netbeans to build the screen. On this screen I have a button that generates random numbers and places them inside an array, but I can not change its size when it is running.
What I did: I created a "tam" variable and assigned it to the vector
int vetor[] = new int[tam];
Then I created a button that updates the "tam" variable, defined in a field.
tam = Integer.parseInt(txtTamanho.getText());
But when you generate the vector again it continues with the same size.