I have a simple calculate code that count about box volume (long * width * height):
ActionListener volListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
String L = long.getText();
String W = width.getText();
String H = height.getText();
double parseL = Double.parseDouble(L);
double parseW = Double.parseDouble(W);
double parseH = Double.parseDouble(H);
double volResult = parseL*parseW*parseH;
txtAreaOut.append("Volume : " + volResult + "\n");
long.setText("");
width.setText("");
height.setText("");
}catch(NumberFormatException nfe){
String fault = nfe.getMessage();
infoBox(fault, " " + nfe.getClass());
}
}
};
If "volResult" return large number, for example 9.0408284742E7, and i want the result like this 9.040.828.474...
How the code?..