Can someone help me for lopping this code?
if(box1.isSelected()){ N = box1.getText();
P = Float.valueOf(price1.getText());
S = Integer.parseInt(spin1.getValue().toString());
PT = S*P;
selected();
}
I have a total of 60 checkboxes. I use JFrame and every box has the variable name of box1 to box60. I just want to minimize my code.
Aucun commentaire:
Enregistrer un commentaire