Trouble with radio buttons...
I have a seperate .java file that create the radio buttons, and when one is clicked it is initialized to a number. In another file, i need to have it that if a user clicks on a specific radio button, specific items dont show up in a JOptionPane msg box. I am confused on how to do this...
this is where my radio buttons get initialized in the CustomerTypePanel.java:
// Logic ...
if (regular.isSelected())
return REGULAR_DISCOUNT;
elseif (student.isSelected())
return STUDENT_DISCOUNT;
elseif (employee.isSelected())
return EMPLOYEE_DISCOUNT;
else
return FACULTY_DISCOUNT;
and this is what I want to happen in the CustomerJobCalculator.java:
if (--USER IS NOT A REGULAR CUSTOMER--)
{
JOptionPane.showMessageDialog(null,
"Tentative Bill: " + money.format(tentativeTotal) +
"\nDiscount Amount: " + money.format(discountAmount) +
"\nDiscounted Bill: " + money.format(discountTotal) +
"\nApplicable Sales Tax: " + money.format(salesTaxTotal) +
"\nTotal Bill: " + money.format(finalTotal));
}
//If the user is a Regular customer, then the discount amount and
//discounted bill will NOT be displayed
else
{
JOptionPane.showMessageDialog(null,
"Tentative Bill: " + money.format(tentativeTotal) +
"\nApplicable Sales Tax: " + money.format(salesTaxTotal) +
"\nTotal Bill: " + money.format(finalTotal));
}
if anyone could help me out, I would appreciate it. Thanks

