jRadioButton
Hi All
I have in my code 3 radio buttons. Now I want to loop between the three of them, and to look which one of them is set on.
Now, they look like jradiobutton1..3, this is how netbeans set them automaticlly. and I want them to be an array.
BTW, How do I change their name ? to be something nicer and readable.
Thanks
Ilan
# 1
A good example of why UI-builder generated code sucks, and why writing your own code doesn't.
Like you say, you want them in an array (or a Collection). UI builders are too stupid to know what you want to do in the code - you're smarter than that, so what makes you think the UI builder is a better tool than your fingers? :o)
# 4
Er, if they're already in a ButtonGroup, use ButtonGroup.getSelection() to get the model of the relevant button.The model should hold everything you need to access.