How to pass radio button's value to another frame
i only know how to pass label and textfield value but not radiobutton.
is there anyway to take the value from radiobutton to another frame?
this is the code of mine how to pass label and textfield
public void actionPerformed(ActionEvent e){
if((e.getSource() == jBook)) {
String name = jlbName.getText ();
String date = jlbDateProduce.getText ();
int number = (Integer.parseInt(jtfNoOfTicket.getText().trim()));
String price = jlbPrice.getText ();
//Passing
ticketReservation frame = new ticketReservation(name, date, price, String.valueOf(number));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("Ticket Reservation"); //set title of the window
frame.setSize(800,600); //size of the window
frame.setVisible(true); //visible the window
frame.setLocationRelativeTo (null); //center the window
}
public ticketReservation (String name, String date, String price, String number) {
setLayout(null); //set LayoutManager
// initialized the label
jlbName = new JLabel("Movie : " + name);
jlbDate = new JLabel(date);
jlbShowtime = new JLabel("Showtime :");
jlbNoOfSeats = new JLabel("No of Seats :");
jlbPrice = new JLabel(price);
jlbNoOfTicket = new JLabel("Number of Tickets : " +number);