In Java Swing I have a simple table where in each row the name of the element and a checkbox is included. Users can select any of the elements contained by clicking in the associated check-box. I would like to have a string below the table that constantly keeps track of the number of elements selected (E.g. “3 elements have been selected”). So as soon the use checks or un-checks an element the string automatically changes. Is it possible? Do I need to associate an event listener to every check box?
Share
Yes, this is possible. However, you can also associate a single listener with all of your checkboxes.