Learn to Add in Java using NetBeans Add Comment Click on jButton and than enter the given code:double num1 = Double.parseDouble(jTextField1.getText()); double num2 = Double.parseDouble(jTextField2.getText()); double num3 = num1 + num2; jTextField3.setText(""+num3);
Net Payable Amount (GUI) - JAVA Project Add Comment 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. }