This tutorial will teach Chicken Shop Inventory Management using Java step by step.



Paste the Code inside the Cal Button
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.