removed child class, upgraded classpath
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_221"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_231"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -178,7 +178,7 @@ public class BillingSystem {
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
|
||||
Child_Billing OnlyNumbers = new Child_Billing();
|
||||
Parent_Billing OnlyNumbers = new Parent_Billing();
|
||||
try {
|
||||
OnlyNumbers.NumbersOnly(e);
|
||||
} catch (NumberFormatException ex) {
|
||||
@@ -195,7 +195,7 @@ public class BillingSystem {
|
||||
textFieldTravel.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
Child_Billing OnlyNumbers = new Child_Billing();
|
||||
Parent_Billing OnlyNumbers = new Parent_Billing();
|
||||
try {
|
||||
OnlyNumbers.NumbersOnly(e);
|
||||
} catch (NumberFormatException ex) {
|
||||
@@ -212,7 +212,7 @@ public class BillingSystem {
|
||||
textFieldPlastic.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
Child_Billing OnlyNumbers = new Child_Billing();
|
||||
Parent_Billing OnlyNumbers = new Parent_Billing();
|
||||
try {
|
||||
OnlyNumbers.NumbersOnly(e);
|
||||
} catch (NumberFormatException ex) {
|
||||
@@ -229,7 +229,7 @@ public class BillingSystem {
|
||||
textFieldCopper.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
Child_Billing OnlyNumbers = new Child_Billing();
|
||||
Parent_Billing OnlyNumbers = new Parent_Billing();
|
||||
try {
|
||||
OnlyNumbers.NumbersOnly(e);
|
||||
} catch (NumberFormatException ex) {
|
||||
@@ -246,7 +246,7 @@ public class BillingSystem {
|
||||
textFieldChrome.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
Child_Billing OnlyNumbers = new Child_Billing();
|
||||
Parent_Billing OnlyNumbers = new Parent_Billing();
|
||||
try {
|
||||
OnlyNumbers.NumbersOnly(e);
|
||||
} catch (NumberFormatException ex) {
|
||||
@@ -482,7 +482,7 @@ public class BillingSystem {
|
||||
JButton btnExit = new JButton("Exit");
|
||||
btnExit.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
Child_Billing iExit = new Child_Billing();
|
||||
Parent_Billing iExit = new Parent_Billing();
|
||||
try {
|
||||
iExit.iExitSystem();
|
||||
} catch (NumberFormatException e) {
|
||||
@@ -537,25 +537,19 @@ public class BillingSystem {
|
||||
tDate.format(timer.getTime());
|
||||
// ----------------------------Receipt----------------------------
|
||||
|
||||
textReceipt.append("\tBilling System:\n" + "Reference:\t\t\t" + refs +
|
||||
"\n================================================\n" +
|
||||
"Labour:\t\t\t" + textFieldLabour.getText() + "\n\n" +
|
||||
"Travel:\t\t\t" + textFieldTravel.getText() + "\n\n" +
|
||||
"Plastic:\t\t\t" + textFieldPlastic.getText() + "\n\n" +
|
||||
"Copper:\t\t\t" + textFieldCopper.getText() + "\n\n" +
|
||||
"Chrome:\t\t\t" + textFieldChrome.getText() + "\n\n" +
|
||||
"VAT:\t\t\t" + textFieldVAT.getText() + "\n\n" +
|
||||
"================================================\n"+
|
||||
textReceipt.append("\tBilling System:\n" + "Reference:\t\t\t" + refs
|
||||
+ "\n================================================\n" + "Labour:\t\t\t"
|
||||
+ textFieldLabour.getText() + "\n\n" + "Travel:\t\t\t" + textFieldTravel.getText() + "\n\n"
|
||||
+ "Plastic:\t\t\t" + textFieldPlastic.getText() + "\n\n" + "Copper:\t\t\t"
|
||||
+ textFieldCopper.getText() + "\n\n" + "Chrome:\t\t\t" + textFieldChrome.getText() + "\n\n"
|
||||
+ "VAT:\t\t\t" + textFieldVAT.getText() + "\n\n"
|
||||
+ "================================================\n" +
|
||||
|
||||
"Tax:\t\t\t" + textFieldTax.getText() + "\n\n" +
|
||||
"Subtotal:\t\t\t" + textFieldSubtotal.getText() + "\n\n" +
|
||||
"Total:\t\t\t" + textFieldTotal.getText() + "\n\n" +
|
||||
"Tax:\t\t\t" + textFieldTax.getText() + "\n\n" + "Subtotal:\t\t\t" + textFieldSubtotal.getText()
|
||||
+ "\n\n" + "Total:\t\t\t" + textFieldTotal.getText() + "\n\n" +
|
||||
|
||||
"================================================\n\n"+
|
||||
tDate.format(timer.getTime()) + "\n"+
|
||||
tTime.format(timer.getTime()) + "\n"+
|
||||
"\nThank you!"
|
||||
);
|
||||
"================================================\n\n" + tDate.format(timer.getTime()) + "\n"
|
||||
+ tTime.format(timer.getTime()) + "\n" + "\nThank you!");
|
||||
}
|
||||
});
|
||||
btnRecipt.setFont(new Font("Tahoma", Font.BOLD, 35));
|
||||
@@ -567,7 +561,7 @@ public class BillingSystem {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
double iVAT, iTax, iSubtotal, iTotal;
|
||||
Child_Billing Cost_Of_Material = new Child_Billing();
|
||||
Parent_Billing Cost_Of_Material = new Parent_Billing();
|
||||
Cost_Of_Material.Labour = Cost_Of_Material.pLabour * Double.parseDouble(textFieldLabour.getText());
|
||||
Cost_Of_Material.Travel = Cost_Of_Material.pTravel * Double.parseDouble(textFieldTravel.getText());
|
||||
Cost_Of_Material.Plastic = Cost_Of_Material.pPlastic * Double.parseDouble(textFieldPlastic.getText());
|
||||
@@ -595,9 +589,8 @@ public class BillingSystem {
|
||||
String total = String.format("%.2f", iTotal);
|
||||
textFieldTotal.setText(total);
|
||||
|
||||
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",Cost_Of_Material.Chrome + Cost_Of_Material.Copper
|
||||
+ Cost_Of_Material.Plastic));
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",
|
||||
Cost_Of_Material.Chrome + Cost_Of_Material.Copper + Cost_Of_Material.Plastic));
|
||||
|
||||
textFieldCostOfLabor.setText(String.format("%.2f", Cost_Of_Material.Labour));
|
||||
textFieldMileage.setText(String.format("%.2f", Cost_Of_Material.Travel));
|
||||
@@ -624,9 +617,8 @@ public class BillingSystem {
|
||||
String total = String.format("%.2f", iTotal);
|
||||
textFieldTotal.setText(total);
|
||||
|
||||
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",Cost_Of_Material.Chrome + Cost_Of_Material.Copper
|
||||
+ Cost_Of_Material.Plastic));
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",
|
||||
Cost_Of_Material.Chrome + Cost_Of_Material.Copper + Cost_Of_Material.Plastic));
|
||||
|
||||
textFieldCostOfLabor.setText(String.format("%.2f", Cost_Of_Material.Labour));
|
||||
textFieldMileage.setText(String.format("%.2f", Cost_Of_Material.Travel));
|
||||
@@ -653,9 +645,8 @@ public class BillingSystem {
|
||||
String total = String.format("%.2f", iTotal);
|
||||
textFieldTotal.setText(total);
|
||||
|
||||
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",Cost_Of_Material.Chrome + Cost_Of_Material.Copper
|
||||
+ Cost_Of_Material.pPlastic));
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",
|
||||
Cost_Of_Material.Chrome + Cost_Of_Material.Copper + Cost_Of_Material.pPlastic));
|
||||
|
||||
textFieldCostOfLabor.setText(String.format("%.2f", Cost_Of_Material.Labour));
|
||||
textFieldMileage.setText(String.format("%.2f", Cost_Of_Material.Travel));
|
||||
@@ -682,9 +673,8 @@ public class BillingSystem {
|
||||
String total = String.format("%.2f", iTotal);
|
||||
textFieldTotal.setText(total);
|
||||
|
||||
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",Cost_Of_Material.Chrome + Cost_Of_Material.Copper
|
||||
+ Cost_Of_Material.Plastic));
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",
|
||||
Cost_Of_Material.Chrome + Cost_Of_Material.Copper + Cost_Of_Material.Plastic));
|
||||
|
||||
textFieldCostOfLabor.setText(String.format("%.2f", Cost_Of_Material.Labour));
|
||||
textFieldMileage.setText(String.format("%.2f", Cost_Of_Material.Travel));
|
||||
@@ -711,9 +701,8 @@ public class BillingSystem {
|
||||
String total = String.format("%.2f", iTotal);
|
||||
textFieldTotal.setText(total);
|
||||
|
||||
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",Cost_Of_Material.Chrome + Cost_Of_Material.Copper
|
||||
+ Cost_Of_Material.pPlastic));
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",
|
||||
Cost_Of_Material.Chrome + Cost_Of_Material.Copper + Cost_Of_Material.pPlastic));
|
||||
|
||||
textFieldCostOfLabor.setText(String.format("%.2f", Cost_Of_Material.Labour));
|
||||
textFieldMileage.setText(String.format("%.2f", Cost_Of_Material.Travel));
|
||||
@@ -740,14 +729,14 @@ public class BillingSystem {
|
||||
String total = String.format("%.2f", iTotal);
|
||||
textFieldTotal.setText(total);
|
||||
|
||||
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",Cost_Of_Material.Chrome + Cost_Of_Material.Copper
|
||||
+ Cost_Of_Material.Plastic));
|
||||
textFieldCostOfMaterial.setText(String.format("%.2f",
|
||||
Cost_Of_Material.Chrome + Cost_Of_Material.Copper + Cost_Of_Material.Plastic));
|
||||
|
||||
textFieldCostOfLabor.setText(String.format("%.2f", Cost_Of_Material.Labour));
|
||||
textFieldMileage.setText(String.format("%.2f", Cost_Of_Material.Travel));
|
||||
}
|
||||
//--------------------------------Enable Text-----------------------------------------------------------
|
||||
// --------------------------------Enable
|
||||
// Text-----------------------------------------------------------
|
||||
JTextField clearText = null;
|
||||
|
||||
for (Component c : panel_2.getComponents()) {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package billingSystem;
|
||||
|
||||
public class Child_Billing extends Parent_Billing {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user