您好,我的 Japplet 正在使用一个 JComboBox 和 5 个 JRadioButtons 在小程序上进行绘制和绘制。目前一切正常,除了我的 JRadioButtons 在选择按钮时不调用 itemStateChanged() 。所以在小程序上我可以点击一个按钮,但它不会触发。我的组合框也在使用 itemlistener 界面并且它可以工作,但无论我尝试了什么,我都无法获得发送信息/触发的按钮。
我注意到需要单击两次才能选择一个按钮,并希望问题出在其中。
This is for a homework problem and if I could use an actionperformed and actionlistener I would :(. I need to use itemlistener. Below are examples of how I'm calling my radiobuttons, adding them to the shapes buttongroup, and adidng the buttons to the container c.
Thanks for any help!
Sorry to anyone reading this but because it was homework I'm not 100% sure I can keep the code up, PM me if you need help understanding it!