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());
30.9k questions
32.9k answers
500 comments
665 users