This tutorial will teach Chicken Shop Inventory Management using Java step by step.
Paste the Code inside the Cal Button
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | double qty; double cal; qty = Double.parseDouble(txtqty.getText()); if(cboption.getSelectedItem().equals("Gr")) { cal = 500 * qty/1000; //Gr Calculation } else { cal = 500 * qty; //Kg Calculation } txttot.setText(Double.toString(cal)); |
i have attached the video link below. which will do this tutorials step by step.