Good I want to repeat my function that generates a random position in the frame and moves me a place label. But I execute function 1 only once. Does anyone have a solution? I leave the code, my idea is that when you press a -button, the function will be performed. It will be repeated 100 times the generate function.
public void generar(){
int x=(int)(Math.random()*300);
int y=(int)(Math.random()*300);
lbl1.setLocation(x, y);
}
public void traer(){
for(int i=0; i<100;i++){
generar();
}
}