jeudi 12 novembre 2015

How to store extra data to a swing checkbox?

It's easy to create a checkbox in swing, as:

JCheckBox checkbox = new JCheckBox("hello")

The problem is I also want to associate some other values with this checkbox, e.g. another number, 99

But I can't find any methods of a JCheckBox to do it, how to do it?




Aucun commentaire:

Enregistrer un commentaire