Back
You can try Double.parseDouble() to change a String into a double:
String text = "12.34"; // example Stringdouble value = Double.parseDouble(text);
String text = "12.34"; // example String
double value = Double.parseDouble(text);
For your situation it seems like you require:
double total = Double.parseDouble(jlbTotal.getText());double price = Double.parseDouble(jlbPrice.getText());
double total = Double.parseDouble(jlbTotal.getText());
double price = Double.parseDouble(jlbPrice.getText());
31k questions
32.8k answers
501 comments
693 users