Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 JPanel,里面有各种复选框。我不想在每个复选框中添加一个侦听器,而是希望在其中任何一个发生更改时执行一个方法。如果有办法做到这一点,或者如果有更好的方法来做到这一点,请告诉我。