This tutorial will teach you how to make a Beer Shop Inventory Management System in Java step by step. This system will helpful you to learn Inventory Management System.
DefaultTableModel m;
int sum = 0;
if(txtKing.isSelected())
{
String kingfish = "King Fisher";
int price = 200;
int qty = Integer.parseInt(txtKgQty.getText());
int tot = price * qty;
m = (DefaultTableModel)jTable1.getModel();
m.addRow(new Object[]
{
kingfish,
price,
qty,
tot
}
);
}
if(txtHay.isSelected())
{
String Haywards = "Haywards";
int price = 100;
int qty = Integer.parseInt(txtHayQty.getText());
int tot = price * qty;
m = (DefaultTableModel)jTable1.getModel();
m.addRow(new Object[]
{
Haywards,
price,
qty,
tot
}
);
}
if(txtRoyal.isSelected())
{
String Royal = "Royal Challenge";
int price = 300;
int qty = Integer.parseInt(txtRoyQty.getText());
int tot = price * qty;
m = (DefaultTableModel)jTable1.getModel();
m.addRow(new Object[]
{
Royal,
price,
qty,
tot
}
);
}
if(Knock.isSelected())
{
String Knock = "Knock Out";
int price = 350;
int qty = Integer.parseInt(txtKnoQty.getText());
int tot = price * qty;
m = (DefaultTableModel)jTable1.getModel();
m.addRow(new Object[]
{
Knock,
price,
qty,
tot
}
);
}
for(int i=0; i<jTable1.getRowCount(); i++)
{
sum = sum + Integer.parseInt(jTable1.getValueAt(i, 3).toString());
}
txtPay.setText(Integer.toString(sum));
Act as a Java developer to create a program that calculates the gross wage for…
Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…
In this tutorial, we will teach you how to create a simple school management system…
I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…
In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…
this tutorial we will discuss about how to make the point of sales system step…