Package javax.swing

Examples of javax.swing.JRadioButton.addActionListener()


        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


    JRadioButton enableButton = new JRadioButton("VQ");
    enableButton.setBackground(c);
    composerButtons.add(enableButton);
    enableButton.setSelected(false);
    enableButton.addActionListener(this);
    //set the action command to the name of the composer class!
    enableButton.setActionCommand("VQComposer");
    selectComposerPanel.add(enableButton);
   
    JTextArea description = new JTextArea(VQComposer.oldDesc);
View Full Code Here

    JRadioButton enableButton = new JRadioButton("HMM");
    enableButton.setBackground(c);
    composerButtons.add(enableButton);
    enableButton.setSelected(false);
    enableButton.addActionListener(this);
    //set the action command to the name of the composer class!
    enableButton.setActionCommand("HMMComposer");
    selectComposerPanel.add(enableButton);
   
    JTextArea description = new JTextArea(HMMComposer.oldDesc);
View Full Code Here

      }
    });


    final JRadioButton jRB_noImage = new JRadioButton("use no image");
    jRB_noImage.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        jTF_ownImage.setEnabled(false);
        jB_ownImage.setEnabled(false);
      }
    });
View Full Code Here

        jB_ownImage.setEnabled(false);
      }
    });

    final JRadioButton jRB_systemImage = new JRadioButton("use system image", true);
    jRB_systemImage.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        jTF_ownImage.setEnabled(false);
        jB_ownImage.setEnabled(false);
      }
    });
View Full Code Here

        jB_ownImage.setEnabled(false);
      }
    });

    final JRadioButton jRB_ownImage = new JRadioButton("use own image");
    jRB_ownImage.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        jTF_ownImage.setEnabled(true);
        jB_ownImage.setEnabled(true);
      }
    });
View Full Code Here

      while (enu.hasMoreElements())
      {
         JRadioButton btn = (JRadioButton) enu.nextElement();
         this._pnl_.add(btn);
         btn.addActionListener((ActionListener) this);
      }


      super.setMandatoryIcon(false);
     
View Full Code Here

     */
    private void initButtonGroup(String[] resouces, String selected) {
        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

    }

    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;
    }

    @Override
View Full Code Here

        ContactOptionListener l = new ContactOptionListener
            (yesOption,
             new JComponent[] { authorLabel, author, emailLabel, email });
        yesOption.addActionListener(l);
        noOption.addActionListener(l);

        Box buttonBox = Box.createHorizontalBox();
        buttonBox.add(yesOption);
        buttonBox.add(Box.createHorizontalStrut(10));
        buttonBox.add(noOption);
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.