This tutorial will teach you how to make a Cake Shop Inventory Management System in Java step by step. This system will helpful you to learn Inventory Management System.
int sum = 0;
if(chkCho.isSelected())
{
String cho = "Chocolate cake";
int price = 1000;
int qty = Integer.parseInt(txtCqty.getText());
int tot = price * qty;
model = (DefaultTableModel)jTable1.getModel();
model.addRow(new Object[]
{
cho,
price,
qty,
tot
}
);
}
if(chkRed.isSelected())
{
String crispy = "Red velvet cake";
int price = 1200;
int qty = Integer.parseInt(txtRqty.getText());
int tot = price * qty;
model = (DefaultTableModel)jTable1.getModel();
model.addRow(new Object[]
{
crispy,
price,
qty,
tot
}
);
}
if(chkCup.isSelected())
{
String hotdeal = "Cupcake";
int price = 500;
int qty = Integer.parseInt(txtCupqty.getText());
int tot = price * qty;
model = (DefaultTableModel)jTable1.getModel();
model.addRow(new Object[]
{
hotdeal,
price,
qty,
tot
}
);
}
for(int i=0; i<jTable1.getRowCount(); i++)
{
sum = sum + Integer.parseInt(jTable1.getValueAt(i, 3).toString());
}
txtbill.setText(Integer.toString(sum));
What Is the Tesla Pi Phone? Imagine if Tesla, the company that makes famous…
Inventory Management POS systems are now an essential part of modern businesses such as bookshops,…
If you're just beginning to learn Java GUI programming creating an Water System Calculator is a fantastic project for…
GitHub is a powerful tool used by teams and developers around the globe. This guide is…
It's like having a super-smart buddy that is always there to help you write stories,…
The UK is known for its rich history, diverse culture, and most of all its…