The Bike Repair POS System using Java. The project is built to manage sales and transactions. To make a new transaction, fields such as: Repair Type and Repair type to be selected. If you like to learn point of sales systems step by step, this is the right place to learn from the beginning. In this tutorial useful for making a point of sales system for small a shops.
The system shall be able to select the relevant Repair type.
Create the Variables
String name; int price; DefaultTableModel model;
Add Button
if(chkwash.isSelected()) { name = "Wash Bike"; price = 1200; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { name, price }); } if(chkbrakes.isSelected()) { name = "Adjust brakes "; price = 1400; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { name, price }); } if(chkheadset.isSelected()) { name = "Adjust headset"; price = 1600; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { name, price }); } if(chkmoving.isSelected()) { name = "Adjust moving"; price = 2000; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { name, price }); } if(chkwheels.isSelected()) { name = "Align wheels"; price = 2600; model = (DefaultTableModel)jTable1.getModel(); model.addRow(new Object[] { name, price }); } Double sum = 0.0; for(double i=0; i<jTable1.getRowCount(); i++) { sum = sum + Double.parseDouble(jTable1.getValueAt((int)i,1).toString()); } txtbill.setText(Double.toString(sum));
Balance Calculation
private void txtpayKeyReleased(java.awt.event.KeyEvent evt) { Double pay,total,bal; pay = Double.parseDouble(txtpay.getText()); total = Double.parseDouble(txtbill.getText()); bal = pay - total; txtbal.setText(String.valueOf(bal)); }
I have attached the video link below. which will do this tutorials step by step.