Java JButton Settings numberButtonGroup(ButtonGroup buttonGroup)

Here you can find the source of numberButtonGroup(ButtonGroup buttonGroup)

Description

number Button Group

License

Open Source License

Declaration

public static void numberButtonGroup(ButtonGroup buttonGroup) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Enumeration;

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

public class Main {
    public static void numberButtonGroup(ButtonGroup buttonGroup) {
        int entry = 0;
        Enumeration<AbstractButton> buttons = buttonGroup.getElements();
        while (buttons.hasMoreElements()) {
            AbstractButton button = buttons.nextElement();
            button.setActionCommand(Integer.toString(entry++));
        }// w  ww .ja va2  s  .c o  m
    }
}

Related

  1. isSelected(AbstractButton... buttons)
  2. isSelected(final AbstractButton abstractButton)
  3. isSelected(final AbstractButton abstractButton)
  4. lookupButton(Container c, String text)
  5. newTabbedPaneButton(String text)
  6. opacityCheck(AbstractButton b)
  7. paintClassicText(AbstractButton b, Graphics g, int x, int y, String text, int mnemIndex)
  8. parseLevel(ButtonGroup buttonGroup)
  9. removeAllActionListeners(AbstractButton btn)