JCheckbox with item listener problems | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

JCheckbox with item listener problems

Hello, If anyone can help with my problem thank you very much. So I am making a JCheckbox in java eclipse. My goal is to have Int rolls = 3; when checkbox = checked and int rolls = 1; when checkbox = unchecked. Very simple but I can find any instructions to explain this process with item listener when using int instead of a JLabel. Idk if ItemEvent or getStateChange() ==1? Would help.

4th Apr 2020, 8:03 AM
Gold Chopper
Gold Chopper - avatar
1 Answer
+ 1
Hello Gold Chopper Can you please add a code?
4th Apr 2020, 11:14 AM
Denise Roßberg
Denise Roßberg - avatar