You see, I'm a student and I'm doing a math program, the point is that, for this, the user enters a value of n (5, for example) and the program must display the values of 0 to n in different TextFields (with a limit of 6), for example, if the user enters 5 as the value of n, the program should display the values: 0,1,2,3,4,5 in 6 different TextFields
I use SceneBuilder and IntelliJ, so I put the TextFields in SceneBuilder directly. What I came up with was to use a for:
int n = Integer.parseInt(txtN.getText());
for(int x=0;x<=n;x++){
System.out.println(x);
}
}
If you have any other suggestions other than using a for, I'll read them :(