Java JButton Settings addToButtonGroup(ButtonGroup bg, T button)

Here you can find the source of addToButtonGroup(ButtonGroup bg, T button)

Description

add To Button Group

License

Open Source License

Declaration

public static <T extends AbstractButton> T addToButtonGroup(ButtonGroup bg, T button) 

Method Source Code


//package com.java2s;
/*/*from   ww  w. j a  va  2s. c  o m*/
 * Copyright (C) 2010 mightypocket.com. All rights reserved. Use is
 * subject to license terms.
 */

import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;

public class Main {
    public static <T extends AbstractButton> T addToButtonGroup(ButtonGroup bg, T button) {
        bg.add(button);
        return button;
    }
}

Related

  1. addButton(String name, JPanel panel, ActionListener action)
  2. addButtonInPanel(Container component, String text, ActionListener listener)
  3. addButtonToPanel(JPanel panel, Object constraints, String text)
  4. addMiddleButtonDragSupport(Component targetComponent)
  5. addRadioButton(JPanel buttonPanel, ButtonGroup group, String buttonName, boolean selected, ActionListener listener)
  6. applyDefaultProperties(final Button comp)
  7. askYesNoQuestion(String dlgTitle, String question, Component parent, Object[] buttonTittle)
  8. buttonGroup(AbstractButton b1, AbstractButton b2)
  9. buttonGroup(JToggleButton b1, JToggleButton b2)