I have a jlist with an arbitrary number of elements. I would like to limit users to selecting only 3 elements from the list. So far, I haven’t found any really convenient way of doing so, other than making a list selection listener and coding from there.
Is there any built in way, or best practice for in Swing?
Implement your customized selection model. for example, like below.