Package javax.swing

Examples of javax.swing.JRadioButton.addActionListener()


                    }
                }
            };

            JRadioButton level0 = new JRadioButton("Level 0");
            level0.addActionListener(al);
            level0.setActionCommand(level0Command);
            JRadioButton level1 = new JRadioButton("Level 1");
            level1.addActionListener(al);
            level1.setActionCommand(level1Command);
            JRadioButton level2 = new JRadioButton("Level 2");
View Full Code Here


            JRadioButton level0 = new JRadioButton("Level 0");
            level0.addActionListener(al);
            level0.setActionCommand(level0Command);
            JRadioButton level1 = new JRadioButton("Level 1");
            level1.addActionListener(al);
            level1.setActionCommand(level1Command);
            JRadioButton level2 = new JRadioButton("Level 2");
            level2.addActionListener(al);
            level2.setActionCommand(level2Command);
View Full Code Here

            level0.setActionCommand(level0Command);
            JRadioButton level1 = new JRadioButton("Level 1");
            level1.addActionListener(al);
            level1.setActionCommand(level1Command);
            JRadioButton level2 = new JRadioButton("Level 2");
            level2.addActionListener(al);
            level2.setActionCommand(level2Command);

            levels.add(level0);
            levels.add(level1);
            levels.add(level2);
View Full Code Here

    }
    if (tip != null) {
      res.setToolTipText(tip);
    }
    if(listener!=null){
      res.addActionListener(listener);
    }
    return res;
  }

  public JCheckBox getCheckBox(String name, ActionListener listener) {
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 actionPerformed(ActionEvent e) {
View Full Code Here

    JRadioButton selectButton;
    {
      selectButton = new JRadioButton("");
      selectButton.setBounds(btnOff, yOff, FIELD_WIDTH + 1, FIELD_HEIGHT);
      selectButton.setFont(new Font("Dialog", Font.PLAIN, 10));
      selectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent e) {
          enableControls();
        }
      });
      selectButton.setSelected(flamePartRadioButtonList.size() == 0);
View Full Code Here

    appletPanel.setBorder(BorderFactory.createEtchedBorder());
    ButtonGroup bg = new ButtonGroup();
    JRadioButton rb = new JRadioButton(app.getPlain("DynamicWorksheet"));
    rb.setActionCommand("worksheet");
    rb.addActionListener(lst);
    rb.setSelected(true);
    bg.add(rb);
    appletPanel.add(rb);
   
    appletPanel.add(Box.createHorizontalGlue());
View Full Code Here

    appletPanel.add(Box.createHorizontalGlue());

    // open button
    rb = new JRadioButton(app.getPlain("OpenButton"));
    rb.setActionCommand("openButton");
    rb.addActionListener(lst);
    bg.add(rb);     
    appletPanel.add(rb);
   
    centerPanel.add(appletPanel, BorderLayout.CENTER);
    tab.add(centerPanel, BorderLayout.CENTER);   
View Full Code Here

                else
                {
                    radio.setSelected(false);
                }
                group.add(radio);
                radio.addActionListener(this);
                radio.setAlignmentX(Component.LEFT_ALIGNMENT);
                add(radio);
            }
            JPanel lineInfo = new JPanel();
            lineInfo.setLayout(new BoxLayout(lineInfo, BoxLayout.Y_AXIS));
View Full Code Here

      for (int i = 0; i < lookAndFeels.length; i++) {
        final UIManager.LookAndFeelInfo lfInfo = lookAndFeels[i];
        final JRadioButton lfItem = new JRadioButton(lfInfo.getName());
        lfItem.setName(lfInfo.getClassName());
        lfItem.addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              uncommittedPreferenceModel.setLookAndFeelClassName(
                lfInfo.getClassName());
            }
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.