Results 1 to 2 of 2
  1. #1
    pucketter is offline Member
    Join Date
    Dec 2013
    Posts
    5
    Rep Power
    0

    Default How to Display Radio Buttons Selected on a Preview Report?

    I created a JTabbedPane for data entry purposes of a Sub sandwich order. I created a "Review Order" button that opens a separate JPanel that will display what items they selected from various radio buttons. I tried "getSelectedIcon" method but it is giving a "null" return. I'm using Eclipse to compile my code and I have another class that is holding my main method.


    import javax.swing.JFrame;
    import javax.swing.JTabbedPane;
    import java.awt.GridLayout;
    import javax.swing.AbstractButton;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import java.awt.Color;
    import javax.swing.border.TitledBorder;
    import javax.swing.border.BevelBorder;
    import javax.swing.JTextField;
    import javax.swing.JRadioButton;
    import java.awt.FlowLayout;
    import java.awt.Font;
    import javax.swing.ButtonGroup;
    import java.awt.Button;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;

    // TODO: Auto-generated Javadoc
    /**
    * The Class Sandwich.
    */
    public class Sandwich extends JFrame {

    /** The jpnl step1. */
    private JPanel jpnlStep1;

    /** The jpnl step3. */
    private JPanel jpnlStep3;

    /** The jpnl step4. */
    private JPanel jpnlStep4;

    /** The jpnl step5. */
    private JPanel jpnlStep5;

    /** The jpnl step6. */
    private JPanel jpnlStep6;

    /** The jpnl step7. */
    private JPanel jpnlStep7;

    /** The size button grp. */
    private final ButtonGroup sizeButtonGrp = new ButtonGroup();

    /** The jlbl welcome. */
    private JLabel jlblWelcome;

    /** The lbl new label. */
    private JLabel lblNewLabel;

    /** The rdbtn size6. */
    private JRadioButton rdbtnSize6;

    /** The rdbtn size12. */
    private JRadioButton rdbtnSize12;

    /** The rdbtn flatbd. */
    private JRadioButton rdbtnFlatbd;

    /** The rdbtn grain brd. */
    private JRadioButton rdbtnGrainBrd;

    /** The rdbtn italian brd. */
    private JRadioButton rdbtnItalianBrd;

    /** The rdbtn italian hrb brd. */
    private JRadioButton rdbtnItalianHrbBrd;

    /** The rdbtn wheat brd. */
    private JRadioButton rdbtnWheatBrd;

    /** The button group brd. */
    private final ButtonGroup buttonGroupBrd = new ButtonGroup();

    /** The button group cheese. */
    private final ButtonGroup buttonGroupCheese = new ButtonGroup();

    /** The jpnl step2. */
    private JPanel jpnlStep2;

    /** The jlbl first1. */
    private JLabel jlblFirst1;

    /** The review panel. */
    private JPanel reviewPanel;

    /**
    * Instantiates a new sandwich.
    */
    public Sandwich() {
    getContentPane().setLayout(new GridLayout(0, 1, 0, 0));

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    getContentPane().add(tabbedPane);

    jpnlStep1 = new JPanel();
    jpnlStep1.setBackground(new Color(255, 255, 255));
    jpnlStep1.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Name and Sandwich Size",
    TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 128,
    0)));
    tabbedPane.addTab("Step 1", null, jpnlStep1, "Start Your Order Here!");

    JLabel jlblName = new JLabel("First Name");
    jlblName.setForeground(new Color(0, 128, 0));
    jlblName.setBackground(new Color(0, 128, 0));
    jlblName.setFont(new Font("Arial Black", Font.BOLD, 14));

    final JRadioButton rdbtnSize6 = new JRadioButton("6 inch Sub: $2.50");
    sizeButtonGrp.add(rdbtnSize6);
    AbstractButton rdbtnSize12 = null;
    sizeButtonGrp.add(rdbtnSize12);
    rdbtnSize6.setBackground(new Color(255, 255, 255));
    rdbtnSize6.setForeground(new Color(0, 128, 0));
    rdbtnSize6.setFont(new Font("Arial", Font.BOLD, 12));

    JRadioButton rdbtnSize121 = new JRadioButton("12 inch sub: $5.00");
    rdbtnSize121.setBackground(new Color(255, 255, 255));
    rdbtnSize121.setForeground(new Color(0, 128, 0));
    rdbtnSize121.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep1.setLayout(new FlowLayout(FlowLayout.CENTER, 75, 50));
    jpnlStep1.add(jlblName);

    final JTextField jtxtName = new JTextField();
    jtxtName.setColumns(20);
    jpnlStep1.add(jtxtName);
    jpnlStep1.add(rdbtnSize6);
    jpnlStep1.add(rdbtnSize121);

    jlblWelcome = new JLabel("Welcome to Subway!");
    jlblWelcome.setForeground(new Color(0, 128, 0));
    jlblWelcome.setFont(new Font("Arial Black", Font.BOLD, 18));
    jpnlStep1.add(jlblWelcome);

    //create next page button to go to the next tab-NEED TO ADD CODE

    Button buttonNext = new Button("Next Page");
    buttonNext.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {

    }
    });

    buttonNext.setForeground(new Color(0, 128, 0));
    buttonNext.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep1.add(buttonNext);

    jpnlStep2 = new JPanel();
    jpnlStep2.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Choose Your Bread!", TitledBorder.LEADING,
    TitledBorder.TOP, null, new Color(0, 128, 0)));
    jpnlStep2.setBackground(new Color(255, 255, 255));
    jpnlStep2.setToolTipText("Choose your Bread!");
    tabbedPane.addTab("Step 2", null, jpnlStep2, null);
    jpnlStep2.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

    JRadioButton rdbtnFlatBd = new JRadioButton("Flat Bread");
    rdbtnFlatBd.setBackground(new Color(255, 255, 255));
    rdbtnFlatBd.setForeground(new Color(0, 128, 0));
    rdbtnFlatBd.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep2.add(rdbtnFlatBd);

    JRadioButton rdbtnWheatBrd = new JRadioButton("9-Grain Wheat");
    rdbtnWheatBrd.setBackground(new Color(255, 255, 255));
    rdbtnWheatBrd.setForeground(new Color(0, 128, 0));
    rdbtnWheatBrd.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep2.add(rdbtnWheatBrd);

    rdbtnGrainBrd = new JRadioButton("9-Grain Honey Oat");
    rdbtnGrainBrd.setBackground(new Color(255, 255, 255));
    rdbtnGrainBrd.setForeground(new Color(0, 128, 0));
    rdbtnGrainBrd.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep2.add(rdbtnGrainBrd);

    rdbtnItalianBrd = new JRadioButton("Italian");
    rdbtnItalianBrd.setBackground(new Color(255, 255, 255));
    rdbtnItalianBrd.setForeground(new Color(0, 128, 0));
    rdbtnItalianBrd.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep2.add(rdbtnItalianBrd);

    rdbtnItalianHrbBrd = new JRadioButton("Italian Herbs & Cheese");
    rdbtnItalianHrbBrd.setBackground(new Color(255, 255, 255));
    rdbtnItalianHrbBrd.setForeground(new Color(0, 128, 0));
    rdbtnItalianHrbBrd.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep2.add(rdbtnItalianHrbBrd);

    buttonGroupBrd.add(rdbtnFlatBd);
    buttonGroupBrd.add(rdbtnItalianHrbBrd);
    buttonGroupBrd.add(rdbtnItalianBrd);
    buttonGroupBrd.add(rdbtnGrainBrd);
    buttonGroupBrd.add(rdbtnWheatBrd);

    jpnlStep3 = new JPanel();
    jpnlStep3.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Choose Your Meat!", TitledBorder.LEADING,
    TitledBorder.TOP, null, new Color(0, 128, 0)));
    jpnlStep3.setBackground(new Color(255, 255, 255));
    tabbedPane.addTab("Step 3", null, jpnlStep3, "Choose your Meat!");

    JRadioButton rdbtnHam = new JRadioButton("Ham");
    rdbtnHam.setBackground(new Color(255, 255, 255));
    rdbtnHam.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnHam.setForeground(new Color(0, 128, 0));
    jpnlStep3.add(rdbtnHam);

    JRadioButton rdbtnRoastBf = new JRadioButton("Roast Beef");
    rdbtnRoastBf.setForeground(new Color(0, 128, 0));
    rdbtnRoastBf.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnRoastBf.setBackground(new Color(255, 255, 255));
    jpnlStep3.add(rdbtnRoastBf);

    JRadioButton rdbtnTurkey = new JRadioButton("Turkey");
    rdbtnTurkey.setForeground(new Color(0, 128, 0));
    rdbtnTurkey.setBackground(new Color(255, 255, 255));
    rdbtnTurkey.setFont(new Font("Arial", Font.BOLD, 12));
    jpnlStep3.add(rdbtnTurkey);

    JRadioButton rdbtnChicken = new JRadioButton("Chicken");
    rdbtnChicken.setForeground(new Color(0, 128, 0));
    rdbtnChicken.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnChicken.setBackground(new Color(255, 255, 255));
    jpnlStep3.add(rdbtnChicken);

    JRadioButton rdbtnNone = new JRadioButton("None-Cheese Only");
    rdbtnNone.setForeground(new Color(0, 128, 0));
    rdbtnNone.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnNone.setBackground(new Color(255, 255, 255));
    jpnlStep3.add(rdbtnNone);

    jpnlStep4 = new JPanel();
    jpnlStep4.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Choose Your Cheese!", TitledBorder.LEADING,
    TitledBorder.TOP, null, new Color(0, 128, 0)));
    jpnlStep4.setBackground(new Color(255, 255, 255));
    tabbedPane.addTab("Step 4", null, jpnlStep4, "Choose your Cheese!");

    JRadioButton rdbtnAmCh = new JRadioButton("American Cheese");
    rdbtnAmCh.setForeground(new Color(0, 128, 0));
    rdbtnAmCh.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnAmCh.setBackground(new Color(255, 255, 255));
    jpnlStep4.add(rdbtnAmCh);

    JRadioButton rdbtnProvCh = new JRadioButton("Provolone");
    rdbtnProvCh.setForeground(new Color(0, 128, 0));
    rdbtnProvCh.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnProvCh.setBackground(new Color(255, 255, 255));
    jpnlStep4.add(rdbtnProvCh);

    JRadioButton rdbtnPepJack = new JRadioButton("Pepper Jack");
    rdbtnPepJack.setForeground(new Color(0, 128, 0));
    rdbtnPepJack.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnPepJack.setBackground(new Color(255, 255, 255));
    jpnlStep4.add(rdbtnPepJack);

    JRadioButton rdbtnMozz = new JRadioButton("Mozzarella");
    rdbtnMozz.setForeground(new Color(0, 128, 0));
    rdbtnMozz.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnMozz.setBackground(new Color(255, 255, 255));
    jpnlStep4.add(rdbtnMozz);

    JRadioButton rdbtnNoCh = new JRadioButton("No Cheese");
    rdbtnNoCh.setForeground(new Color(0, 128, 0));
    rdbtnNoCh.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnNoCh.setBackground(new Color(255, 255, 255));
    jpnlStep4.add(rdbtnNoCh);

    buttonGroupCheese.add(rdbtnAmCh);
    buttonGroupCheese.add(rdbtnNoCh);
    buttonGroupCheese.add(rdbtnMozz);
    buttonGroupCheese.add(rdbtnPepJack);
    buttonGroupCheese.add(rdbtnProvCh);

    jpnlStep5 = new JPanel();
    jpnlStep5.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Choose Your Toppings!",
    TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 128,
    0)));
    jpnlStep5.setBackground(new Color(255, 255, 255));
    tabbedPane.addTab("Step 5", null, jpnlStep5, "Choose your Toppings!");

    JRadioButton rdbtnLettuce = new JRadioButton("Lettuce");
    rdbtnLettuce.setForeground(new Color(0, 128, 0));
    rdbtnLettuce.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnLettuce.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnLettuce);

    JRadioButton rdbtnTom = new JRadioButton("Tomatoes");
    rdbtnTom.setForeground(new Color(0, 128, 0));
    rdbtnTom.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnTom.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnTom);

    JRadioButton rdbtnCucumber = new JRadioButton("Cucumbers");
    rdbtnCucumber.setForeground(new Color(0, 128, 0));
    rdbtnCucumber.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnCucumber.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnCucumber);

    JRadioButton rdbtnPickles = new JRadioButton("Pickles");
    rdbtnPickles.setForeground(new Color(0, 128, 0));
    rdbtnPickles.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnPickles.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnPickles);

    JRadioButton rdbtnPeppers = new JRadioButton("Peppers");
    rdbtnPeppers.setForeground(new Color(0, 128, 0));
    rdbtnPeppers.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnPeppers.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnPeppers);

    JRadioButton rdbtnOlives = new JRadioButton("Olives");
    rdbtnOlives.setForeground(new Color(0, 128, 0));
    rdbtnOlives.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnOlives.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnOlives);

    JRadioButton rdbtnRedOn = new JRadioButton("Red Onions");
    rdbtnRedOn.setForeground(new Color(0, 128, 0));
    rdbtnRedOn.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnRedOn.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnRedOn);

    JRadioButton rdbtnJalapenos = new JRadioButton("Jalapenos");
    rdbtnJalapenos.setForeground(new Color(0, 128, 0));
    rdbtnJalapenos.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnJalapenos.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnJalapenos);

    JRadioButton rdbtnTopNone = new JRadioButton("None");
    rdbtnTopNone.setForeground(new Color(0, 128, 0));
    rdbtnTopNone.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnTopNone.setBackground(new Color(255, 255, 255));
    jpnlStep5.add(rdbtnTopNone);

    jpnlStep6 = new JPanel();
    jpnlStep6.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Choose Your Sauce(s)!",
    TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 128,
    0)));
    jpnlStep6.setBackground(new Color(255, 255, 255));
    tabbedPane.addTab("Step 6", null, jpnlStep6, "Choose your Sauces!");

    JRadioButton rdbtnMayo = new JRadioButton("Mayo");
    rdbtnMayo.setForeground(new Color(0, 128, 0));
    rdbtnMayo.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnMayo.setBackground(new Color(255, 255, 255));
    jpnlStep6.add(rdbtnMayo);

    JRadioButton rdbtnMustard = new JRadioButton("Mustard");
    rdbtnMustard.setForeground(new Color(0, 128, 0));
    rdbtnMustard.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnMustard.setBackground(new Color(255, 255, 255));
    jpnlStep6.add(rdbtnMustard);

    JRadioButton rdbtnRanch = new JRadioButton("Ranch");
    rdbtnRanch.setForeground(new Color(0, 128, 0));
    rdbtnRanch.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnRanch.setBackground(new Color(255, 255, 255));
    jpnlStep6.add(rdbtnRanch);

    JRadioButton rdbtnVinegar = new JRadioButton("Vinegar");
    rdbtnVinegar.setForeground(new Color(0, 128, 0));
    rdbtnVinegar.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnVinegar.setBackground(new Color(255, 255, 255));
    jpnlStep6.add(rdbtnVinegar);

    JRadioButton rdbtnSauceNone = new JRadioButton("No Sauce");
    rdbtnSauceNone.setForeground(new Color(0, 128, 0));
    rdbtnSauceNone.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnSauceNone.setBackground(new Color(255, 255, 255));
    jpnlStep6.add(rdbtnSauceNone);

    jpnlStep7 = new JPanel();
    jpnlStep7.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Choose Your Extras!", TitledBorder.LEADING,
    TitledBorder.TOP, null, new Color(0, 128, 0)));
    jpnlStep7.setBackground(new Color(255, 255, 255));
    tabbedPane.addTab("Step7", null, jpnlStep7, "Extra items!");

    JRadioButton rdbtnExMeat = new JRadioButton("Extra Meat: $2.00");
    rdbtnExMeat.setForeground(new Color(0, 128, 0));
    rdbtnExMeat.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnExMeat.setBackground(new Color(255, 255, 255));
    jpnlStep7.add(rdbtnExMeat);

    JRadioButton rdbtnChips = new JRadioButton("Chips/Apples: $1.00");
    rdbtnChips.setForeground(new Color(0, 128, 0));
    rdbtnChips.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnChips.setBackground(new Color(255, 255, 255));
    jpnlStep7.add(rdbtnChips);

    JRadioButton rdbtnPop = new JRadioButton("Pop: $1.00");
    rdbtnPop.setForeground(new Color(0, 128, 0));
    rdbtnPop.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnPop.setBackground(new Color(255, 255, 255));
    jpnlStep7.add(rdbtnPop);

    JRadioButton rdbtnCookie = new JRadioButton("Cookie: $1.00");
    rdbtnCookie.setForeground(new Color(0, 128, 0));
    rdbtnCookie.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnCookie.setBackground(new Color(255, 255, 255));
    jpnlStep7.add(rdbtnCookie);

    JRadioButton rdbtnExNone = new JRadioButton("None");
    rdbtnExNone.setForeground(new Color(0, 128, 0));
    rdbtnExNone.setFont(new Font("Arial", Font.BOLD, 12));
    rdbtnExNone.setBackground(new Color(255, 255, 255));
    jpnlStep7.add(rdbtnExNone);

    JPanel jpnlFinal = new JPanel();
    jpnlFinal.setBorder(new TitledBorder(new BevelBorder(
    BevelBorder.LOWERED, new Color(0, 128, 0),
    new Color(0, 128, 0), new Color(255, 255, 0), new Color(255,
    255, 0)), "Review Your Order!", TitledBorder.LEADING,
    TitledBorder.TOP, null, new Color(0, 128, 0)));
    jpnlFinal.setBackground(new Color(255, 255, 255));
    tabbedPane.addTab("Final Step", null, jpnlFinal, "Review & Submit!");

    JButton jbtnReview = new JButton("Review Order");
    jbtnReview.setForeground(new Color(0, 128, 0));
    jbtnReview.setFont(new Font("Arial", Font.BOLD, 11));
    jpnlFinal.add(jbtnReview);

    jbtnReview.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    JFrame reviewFrame = new JFrame();
    reviewFrame.setVisible(true);
    reviewFrame.setSize(400, 600);
    JPanel reviewPanel = new JPanel(new GridLayout(12, 1));
    reviewPanel.setBackground(new Color(255, 255, 255));

    reviewFrame.getContentPane().add(reviewPanel);

    JLabel jlblFirst1 = new JLabel("First Name: "
    + jtxtName.getText());

    //need the following to display the JRadio button selected ONLY
    JLabel jlblSubSize = new JLabel("Sub Size: " + rdbtnSize6.getSelectedIcon());
    JLabel jlblBread = new JLabel("Bread Choice: " );
    JLabel jlblMeat = new JLabel("Meat Choice: ");
    JLabel jlblCheese = new JLabel("Cheese Choice: ");
    JLabel jlblToppings = new JLabel("Topping Choices: ");
    JLabel jlblSauces = new JLabel("Sauce Choice: ");
    JLabel jlblExtras = new JLabel("Extra Choices: ");

    reviewPanel.add(jlblFirst1);
    reviewPanel.add(jlblSubSize);
    reviewPanel.add(jlblBread);
    reviewPanel.add(jlblCheese);
    reviewPanel.add(jlblMeat);
    reviewPanel.add(jlblToppings);
    reviewPanel.add(jlblSauces);
    reviewPanel.add(jlblExtras);

    }
    });

    }

    }
    Last edited by pucketter; 12-10-2013 at 05:25 AM. Reason: Did not display code correctly

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,041
    Rep Power
    10

    Default Re: How to Display Radio Buttons Selected on a Preview Report?

    When posting code, please use the code tags and post an SSCCE, not just a snippet.

    Consult the API for what the getSelectedIcon() method returns, as well as any methods that might tell you whether a JRadioButton is selected.

    If this doesn't answer your question, post an SSCCE demonstrating exactly what you're talking about, in as few lines as possible.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Radio buttons to open list of more radio buttons
    By mcconnelln89 in forum New To Java
    Replies: 1
    Last Post: 11-16-2013, 03:31 AM
  2. Help help.radio buttons
    By 10e5x in forum New To Java
    Replies: 3
    Last Post: 01-04-2011, 08:10 PM
  3. Help with Radio Buttons
    By miguelms19 in forum AWT / Swing
    Replies: 3
    Last Post: 06-29-2010, 08:49 PM
  4. Select one of X radio buttons
    By Adrien in forum AWT / Swing
    Replies: 1
    Last Post: 02-25-2010, 07:30 PM
  5. How to use Radio Buttons
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-25-2008, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •