This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It is impossible to use a custom ButtonModel with JRadioButton in Visual Form Editor. It generates incorrect code like: carriersButtonGroup.add(okkoRadioButton); // !!! the button is added to the group okkoRadioButton.setText(resourceMap.getString("okkoRadioButton.text")); // NOI18N okkoRadioButton.setModel(new ExButtonModel(15)); // !!! the model for the button is set okkoRadioButton.setName("okkoRadioButton"); // NOI18N The button is added to the group *BEFORE* the model has been changed. It leads to a wrong behavior of the components.
The GUI builder assumes that the properties are independent. Unfortunately, this is not true for buttonGroup and model properties. We will have to hard-code its relation into the GUI builder to fix this issue. By now, you can use the following workaround: 1. Set buttonGroup property. 2. Select JRadioButton. 3. Invoke Customize Code from the contextual menu. 4. Enter radioButton.setModel(...); code manually (on an appropriate line). I understand that this issue is annoying for you, but in general it is a rare use-case => lowering priority.
Fixed - the JRadioButton.model is set before the JRadioButton is added into a ButtonGroup. Modified file: http://hg.netbeans.org/cdev/rev/da2fc5c42207