Ive group 2 options in a JOption Button Group named group1 (see attached code). I want to get and print the text of the option that was selection. In the code the text name of the options are "Deliver" and "Pickup". How do I do that?
transport1 = new JRadioButton("Deliver");
transport2 = new JRadioButton("Pick Up");
ButtonGroup group1 = new ButtonGroup();