JavaFx - How to get button array index if value is all the same

I have an issue when I tried to create multiple buttons with the same value of "x". How can I fix this issue or perhaps get the value of the buttons and then delete the specific element in an array with the same index as my button without deleting other elements as it loops through the for loop?

Button[] delButton = new Button[sizeOfIt]; //sizeOfIt is the size of array

for (int m=0; m
delButton[m] = new Button("x");


for(int x = 0; x < delButton.length; x++) {

delButton[x].setOnAction(new EventHandler() {

public void...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts