Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.1 kB
5
Indexable
Never
  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();
    }                                        
Leave a Comment