Home » Java » java – Is there any more effective way to handle button actions in javaFX?-Exceptionshub

java – Is there any more effective way to handle button actions in javaFX?-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I started learning javaFX and I have noticed that if we make an array of buttons and we want to handle event on single button, we have to search this button (I mean that we have to get source and compare to every single button of array). I think it’s not effective when we have a large number of buttons in array, but I haven’t found any better way to solve this problem. Is there any other way which improves performance? Or maybe I should code in other technology to solve the problem as above?

How to&Answers: