Untitled

 avatar
unknown
plain_text
a year ago
1.1 kB
9
Indexable
  model = (DefaultTableModel) myTable.getModel();
        
        model.addRow(new Object[]{
            name,
            price,
            quantity,
            tAmount1,});

            double totalAmount =0;

            for (int idx = 0; idx < myTable.getRowCount(); idx++) {
                totalAmount = totalAmount + Double.parseDouble(myTable.getValueAt(idx, 3).toString());
}
    tAmount2 = String.format("%.02f", totalAmount);

    jTextField1.setText ("PHP" + tAmount2);
    
            PlaceOrder PlaceOrderFrame = new PlaceOrder();
        PlaceOrderFrame.setVisible (true);


        }
    
    private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {                                     
new jFrame1.setVisible(true);
this.setVisible(false);
    }                                    

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
name = "MELTS – BUFFLO CHICKEN";
price = 229;
additem();
    }                                        
Editor is loading...
Leave a Comment