Example usage for javax.swing JRadioButton setModel

List of usage examples for javax.swing JRadioButton setModel

Introduction

In this page you can find the example usage for javax.swing JRadioButton setModel.

Prototype

@BeanProperty(description = "Model that the Button uses.")
public void setModel(ButtonModel newModel) 

Source Link

Document

Sets the model that this button represents.

Usage

From source file:eu.europa.ec.markt.dss.applet.util.ComponentFactory.java

/**
 * /*  ww w  . j  av a2s  .  c o m*/
 * @param text
 * @param valueModel
 * @param value
 * @return
 */
public static JRadioButton createRadioButton(final String text, final ValueModel valueModel,
        final Object value) {
    final JRadioButton button = new JRadioButton(text);
    final ButtonModel model = new RadioButtonAdapter(valueModel, value);
    button.setModel(model);
    return button;
}