Package javax.swing

Examples of javax.swing.JRadioButton.addActionListener()


      buttonGroup.add(button);
      profilesToButton.put(profile, button);
    }

    final JRadioButton button = new JRadioButton("Manual Linking");
    button.addActionListener(new SelectorAction(null));
    add(button);
    buttonGroup.add(button);
    profilesToButton.put(null, button);

  }
View Full Code Here


  public void addTab (final String name, final Component tab)
  {
    final String cardName = String.valueOf(components.size());
    final JRadioButton radioButton = new JRadioButton(name);
    radioButton.addActionListener(new SelectTabAction(components.size()));

    components.add(tab);
    buttonGroup.add(radioButton);
    radioButtons.add(radioButton);
View Full Code Here

    }

    private JRadioButton createComparatorButton(String name, int value, ButtonGroup group) {
        JRadioButton button = new JRadioButton(name);
        button.setActionCommand(String.valueOf(value));
        button.addActionListener(this);
        group.add(button);
        return button;
    }

    public void focusLost(FocusEvent e) {
View Full Code Here

    private void init(String[] items, String selected) {
        this.add(mLabel);
        for (int idx = 0; idx < items.length; idx++) {
            JRadioButton btn = new JRadioButton(items[idx]);
            btn.setActionCommand(items[idx]);
            btn.addActionListener(this);
            // add the button to the button group
            this.bGroup.add(btn);
            // add the button
            this.add(btn);
            if (selected != null && selected.equals(items[idx])) {
View Full Code Here

    private void init(String[] resouces, String selected) {
        this.add(mLabel);
        for (int idx = 0; idx < resouces.length; idx++) {
            JRadioButton btn = new JRadioButton(JMeterUtils.getResString(resouces[idx]));
            btn.setActionCommand(resouces[idx]);
            btn.addActionListener(this);
            // add the button to the button group
            this.bGroup.add(btn);
            // add the button
            this.add(btn);
            if (selected != null && selected.equals(resouces[idx])) {
View Full Code Here

                    gbc.insets.top = 5;
                }
                add(button, gbc);
                group.add(button);
                button.setActionCommand(Integer.toString(i));
                button.addActionListener(this);
                this.spinners[i] = new SlidingSpinner(this, button);
            }
            else {
                JLabel label = new JLabel();
                add(label, gbc);
View Full Code Here

    private void init(String[] items, String selected) {
        this.add(mLabel);
        for (int idx = 0; idx < items.length; idx++) {
            JRadioButton btn = new JRadioButton(items[idx]);
            btn.setActionCommand(items[idx]);
            btn.addActionListener(this);
            // add the button to the button group
            this.bGroup.add(btn);
            // add the button
            this.add(btn);
            if (selected != null && selected.equals(items[idx])) {
View Full Code Here

    }

    private JRadioButton createComparatorButton(String name, int value, ButtonGroup group) {
        JRadioButton button = new JRadioButton(name);
        button.setActionCommand(String.valueOf(value));
        button.addActionListener(this);
        group.add(button);
        return button;
    }

    public void focusLost(FocusEvent e) {
View Full Code Here

    private void init(String[] resouces, String selected) {
        this.add(mLabel);
        for (int idx = 0; idx < resouces.length; idx++) {
            JRadioButton btn = new JRadioButton(JMeterUtils.getResString(resouces[idx]));
            btn.setActionCommand(resouces[idx]);
            btn.addActionListener(this);
            // add the button to the button group
            this.bGroup.add(btn);
            // add the button
            this.add(btn);
            if (selected != null && selected.equals(resouces[idx])) {
View Full Code Here

        int value,
        ButtonGroup group)
    {
        JRadioButton button = new JRadioButton(name);
        button.setActionCommand(String.valueOf(value));
        button.addActionListener(this);
        group.add(button);
        return button;
    }

    public void focusLost(FocusEvent e)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.