title: How to get the text value of JRadioButton
body: <p>I am creating a project in java. My Program has 80 JRadioButtons .... I need the get the text value of them.. Now these radiobuttons are added to ButtonGroup(each has 4 radio buttons)...</p>
  
  <p>I know how to get the text value from the radio button by this following code</p>
  
  <pre><code>radiobutton1.addActionListener(new ActionListener() {
  
              @Override
              public void actionPerformed(ActionEvent e) {
                  String q1=e.getActionCommand();
                  JOptionPane.showMessageDialog(null, q1);
              }
          });
  </code></pre>
  
  <p>Now is there any easy way to do this? because i will have to do this above code for 80 times(for eighty radiobuttons if i use the above use the  above method</p>
  
  <p>Additional Info- I have Total 20 ButtonGroups each with 4 radio buttons. So(80 radio buttons).</p>