Code to add under jButton1
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//We will add the function.
double price = Double.parseDouble(jTextField1.getText());
double qty = Double.parseDouble(jTextField2.getText()); //double is used for values in points.
double salAmt = price * qty;
double disc = salAmt * 0.10;
double netAmt = salAmt - disc;
jTextField3.setText(" "+salAmt);
jTextField4.setText(" "+disc);
jTextField5.setText(" "+netAmt); //Shortcut key used is SHIFT + DOWN ARROW.
}
EmoticonEmoticon