Source code for seals and calculation.
package RMSystems;
import java.awt.EventQueue;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JCheckBox;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.Toolkit;
import javax.swing.border.LineBorder;
public class SellAndCalculate extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
private JPanel contentPane;
private JTextField textC_Bargur;
private JTextField textB_Bargur;
private JTextField textC_Roll;
private JTextField textV_Roll;
private JTextField textMoglay;
private JTextField textNoodles;
private JLabel lblCostFoods;
private JTextField textFoodTotal;
private JButton btnTotal;
private JLabel lbl_Drinks;
private JCheckBox chck_Coca_Cola;
private JCheckBox chck_Fanta;
private JCheckBox chck_Tea;
private JCheckBox chck_Hot_Coffee;
private JCheckBox chck_Cold_Coffee;
private JCheckBox chck_Juce;
private JTextField text_Juce;
private JTextField text_C_Coffee;
private JTextField text_H_Coffee;
private JTextField text_Tea;
private JTextField text_Fanta;
private JTextField text_C_Cola;
private JButton btn_Reset;
private JTextField textDrinks;
private JLabel lblSubTotal;
private JTextField textSubTotal;
private JLabel lblTotalWithTax;
private JTextField textTotalWithTax;
private JButton btnExit;
private JButton btnBack;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
SellAndCalculate frame = new SellAndCalculate();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
Connection con = null;
/**
* Create the frame.
*/
String Total_Valueof_Foods, Total_Valueof_Drinks, Sub_Total_Food_Drinks, Total_Food_Drinks_WithTax;
double Total_Foods, Total_Drinks, Total_Food_Drinks, tFD;
String CB, BB, CR, VR, MO, NO;
double tValueOfCB, tValueOfBB, tValueOfCR, tValueOfVR, tValueOfMO, tValueOfNO;
///For Drinks … … …
String CCO, FAN, Tea, HCoffee, C_Coffee, Juce;
double tValueOfCCO, tValueOfFAN, tValueOfTea, tValueOfHCoffee, tValueOfC_Coffee, tValueOfJuce;
double Account;
int count1,count2,count3,count4,count5;
public SellAndCalculate() {
setIconImage(Toolkit.getDefaultToolkit().getImage(SellAndCalculate.class.getResource(“/imgs/FoodPICCC.png”)));
con = sqliteConnection.dbConnector();
setTitle(“Admin”);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 803, 582);
contentPane = new JPanel();
contentPane.setBackground(new Color(0, 128, 128));
contentPane.setBorder(new LineBorder(Color.MAGENTA, 2));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblFood = new JLabel(“Foods”);
lblFood.setForeground(Color.WHITE);
lblFood.setFont(new Font(“Tahoma”, Font.BOLD | Font.ITALIC, 20));
lblFood.setBounds(10, 11, 136, 34);
contentPane.add(lblFood);
JCheckBox chck_Chicken_Bargur = new JCheckBox(“Chicken Bargur”);
chck_Chicken_Bargur.setForeground(Color.BLACK);
chck_Chicken_Bargur.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Chicken_Bargur.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Chicken_Bargur.isSelected()){
try {
count1=0; count2=0; count3=0; count4=0; count5=0;
chck_Chicken_Bargur.setSelected(true);
String query = “select Price from Food_Price where Name=’Chicken Bargur’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
CB = textC_Bargur.getText();
//int rb = Integer.parseInt(CB);
double rb = Double.parseDouble(CB);
//System.out.println(rb);
double r = Double.parseDouble(amount);
tValueOfCB = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Chicken_Bargur.setBounds(10, 52, 156, 23);
contentPane.add(chck_Chicken_Bargur);
JCheckBox chck_Beef_Bargur = new JCheckBox(“Beef Bargur”);
chck_Beef_Bargur.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Beef_Bargur.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Beef_Bargur.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Beef_Bargur.setSelected(true);
String query = “select Price from Food_Price where Name=’Beef Bargur’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
BB = textB_Bargur.getText();
double rb = Double.parseDouble(String.valueOf(BB));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfBB = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Beef_Bargur.setBounds(10, 78, 156, 23);
contentPane.add(chck_Beef_Bargur);
JCheckBox chck_Chicken_Roll = new JCheckBox(“Chicken Roll”);
chck_Chicken_Roll.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Chicken_Roll.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Chicken_Roll.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Chicken_Roll.setSelected(true);
String query = “select Price from Food_Price where Name=’Chicken Roll’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
CR = textC_Roll.getText();
double rb = Double.parseDouble(String.valueOf(CR));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfCR = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Chicken_Roll.setBounds(10, 104, 156, 23);
contentPane.add(chck_Chicken_Roll);
JCheckBox chck_Vegetable_Roll = new JCheckBox(“Vegetable Roll”);
chck_Vegetable_Roll.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Vegetable_Roll.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Vegetable_Roll.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Vegetable_Roll.setSelected(true);
String query = “select Price from Food_Price where Name=’Vegetable Roll’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
VR = textV_Roll.getText();
double rb = Double.parseDouble(String.valueOf(VR));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfVR = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Vegetable_Roll.setBounds(10, 130, 156, 23);
contentPane.add(chck_Vegetable_Roll);
JCheckBox chckMoglay = new JCheckBox(“Moglay”);
chckMoglay.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chckMoglay.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chckMoglay.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chckMoglay.setSelected(true);
String query = “select Price from Food_Price where Name=’Moglay’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
MO = textMoglay.getText();
double rb = Double.parseDouble(String.valueOf(MO));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfMO = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chckMoglay.setBounds(10, 156, 156, 23);
contentPane.add(chckMoglay);
JCheckBox chckNoodles = new JCheckBox(“Noodles”);
chckNoodles.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chckNoodles.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chckNoodles.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chckNoodles.setSelected(true);
String query = “select Price from Food_Price where Name=’Noodles’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
NO = textNoodles.getText();
double rb = Double.parseDouble(String.valueOf(NO));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfNO = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chckNoodles.setBounds(10, 183, 156, 23);
contentPane.add(chckNoodles);
textC_Bargur = new JTextField();
textC_Bargur.setBounds(172, 52, 86, 23);
contentPane.add(textC_Bargur);
textC_Bargur.setColumns(10);
textB_Bargur = new JTextField();
textB_Bargur.setBounds(172, 79, 86, 23);
contentPane.add(textB_Bargur);
textB_Bargur.setColumns(10);
textC_Roll = new JTextField();
textC_Roll.setBounds(172, 105, 86, 23);
contentPane.add(textC_Roll);
textC_Roll.setColumns(10);
textV_Roll = new JTextField();
textV_Roll.setBounds(172, 131, 86, 23);
contentPane.add(textV_Roll);
textV_Roll.setColumns(10);
textMoglay = new JTextField();
textMoglay.setBounds(172, 157, 86, 23);
contentPane.add(textMoglay);
textMoglay.setColumns(10);
textNoodles = new JTextField();
textNoodles.setBounds(172, 184, 86, 23);
contentPane.add(textNoodles);
textNoodles.setColumns(10);
lbl_Drinks = new JLabel(“Drinks”);
lbl_Drinks.setForeground(Color.WHITE);
lbl_Drinks.setFont(new Font(“Tahoma”, Font.BOLD | Font.ITALIC, 20));
lbl_Drinks.setBounds(10, 292, 136, 34);
contentPane.add(lbl_Drinks);
chck_Coca_Cola = new JCheckBox(“Coca Cola”);
chck_Coca_Cola.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
if(chck_Coca_Cola.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Coca_Cola.setSelected(true);
String query = “select Price from Drinks_Price where Name=’Coca Cola’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
CCO = text_C_Cola.getText();
double rb = Double.parseDouble(String.valueOf(CCO));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfCCO = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Coca_Cola.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Coca_Cola.setBounds(10, 333, 136, 23);
contentPane.add(chck_Coca_Cola);
chck_Fanta = new JCheckBox(“Fanta”);
chck_Fanta.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Fanta.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Fanta.setSelected(true);
String query = “select Price from Drinks_Price where Name=’Fanta’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
FAN = text_Fanta.getText();
double rb = Double.parseDouble(String.valueOf(FAN));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfFAN = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Fanta.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Fanta.setBounds(10, 359, 136, 23);
contentPane.add(chck_Fanta);
chck_Tea = new JCheckBox(“Tea”);
chck_Tea.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Tea.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Tea.setSelected(true);
String query = “select Price from Drinks_Price where Name=’Tea’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
Tea = text_Tea.getText();
double rb = Double.parseDouble(String.valueOf(Tea));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfTea = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Tea.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Tea.setBounds(10, 385, 136, 23);
contentPane.add(chck_Tea);
chck_Hot_Coffee = new JCheckBox(“Hot Coffee”);
chck_Hot_Coffee.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Hot_Coffee.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Hot_Coffee.setSelected(true);
String query = “select Price from Drinks_Price where Name=’Hot Coffee’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
HCoffee = text_H_Coffee.getText();
double rb = Double.parseDouble(String.valueOf(HCoffee));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfHCoffee = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Hot_Coffee.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Hot_Coffee.setBounds(10, 411, 136, 23);
contentPane.add(chck_Hot_Coffee);
chck_Cold_Coffee = new JCheckBox(“Cold Coffee”);
chck_Cold_Coffee.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Cold_Coffee.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Cold_Coffee.setSelected(true);
String query = “select Price from Drinks_Price where Name=’Cold Coffee’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
C_Coffee = text_C_Coffee.getText();
double rb = Double.parseDouble(String.valueOf(C_Coffee));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfC_Coffee = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Cold_Coffee.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Cold_Coffee.setBounds(10, 437, 136, 23);
contentPane.add(chck_Cold_Coffee);
chck_Juce = new JCheckBox(“Juce”);
chck_Juce.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(chck_Juce.isSelected()){
try {
count1=0 ;count2=0; count3=0; count4=0; count5=0;
chck_Juce.setSelected(true);
String query = “select Price from Drinks_Price where Name=’Juce’ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Price”);
Juce = text_Juce.getText();
double rb = Double.parseDouble(String.valueOf(Juce));
double r = Double.parseDouble(String.valueOf(amount));
tValueOfJuce = r * rb;
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
chck_Juce.setFont(new Font(“Tahoma”, Font.BOLD, 12));
chck_Juce.setBounds(10, 463, 136, 23);
contentPane.add(chck_Juce);
text_Juce = new JTextField();
text_Juce.setBounds(172, 463, 86, 23);
contentPane.add(text_Juce);
text_Juce.setColumns(10);
text_C_Coffee = new JTextField();
text_C_Coffee.setBounds(172, 437, 86, 23);
contentPane.add(text_C_Coffee);
text_C_Coffee.setColumns(10);
text_H_Coffee = new JTextField();
text_H_Coffee.setBounds(172, 412, 86, 23);
contentPane.add(text_H_Coffee);
text_H_Coffee.setColumns(10);
text_Tea = new JTextField();
text_Tea.setBounds(172, 386, 86, 23);
contentPane.add(text_Tea);
text_Tea.setColumns(10);
text_Fanta = new JTextField();
text_Fanta.setBounds(172, 360, 86, 23);
contentPane.add(text_Fanta);
text_Fanta.setColumns(10);
text_C_Cola = new JTextField();
text_C_Cola.setBounds(172, 334, 86, 23);
contentPane.add(text_C_Cola);
text_C_Cola.setColumns(10);
lblCostFoods = new JLabel(“Total Cost of Foods”);
lblCostFoods.setForeground(Color.WHITE);
lblCostFoods.setFont(new Font(“Tahoma”, Font.BOLD | Font.ITALIC, 13));
lblCostFoods.setBounds(369, 60, 187, 29);
contentPane.add(lblCostFoods);
textFoodTotal = new JTextField();
textFoodTotal.setBounds(607, 64, 136, 23);
contentPane.add(textFoodTotal);
textFoodTotal.setColumns(10);
JLabel lblDrinks = new JLabel(“Total Cost of Drinks”);
lblDrinks.setForeground(Color.WHITE);
lblDrinks.setFont(new Font(“Tahoma”, Font.BOLD | Font.ITALIC, 13));
lblDrinks.setBounds(369, 93, 187, 34);
contentPane.add(lblDrinks);
textDrinks = new JTextField();
textDrinks.setBounds(607, 98, 136, 23);
contentPane.add(textDrinks);
textDrinks.setColumns(10);
lblSubTotal = new JLabel(“Sub Total Foods & Drinks”);
lblSubTotal.setForeground(Color.WHITE);
lblSubTotal.setFont(new Font(“Tahoma”, Font.BOLD | Font.ITALIC, 13));
lblSubTotal.setBounds(369, 130, 187, 23);
contentPane.add(lblSubTotal);
textSubTotal = new JTextField();
textSubTotal.setBounds(607, 131, 136, 23);
contentPane.add(textSubTotal);
textSubTotal.setColumns(10);
lblTotalWithTax = new JLabel(“Total cost Food & Drinks(With Tax)”);
lblTotalWithTax.setForeground(Color.WHITE);
lblTotalWithTax.setFont(new Font(“Tahoma”, Font.BOLD | Font.ITALIC, 12));
lblTotalWithTax.setBounds(369, 164, 228, 23);
contentPane.add(lblTotalWithTax);
textTotalWithTax = new JTextField();
textTotalWithTax.setBounds(607, 165, 136, 23);
contentPane.add(textTotalWithTax);
textTotalWithTax.setColumns(10);
btnTotal = new JButton(“Total”);
btnTotal.setForeground(Color.BLUE);
btnTotal.setBackground(Color.WHITE);
btnTotal.setFont(new Font(“Harlow Solid Italic”, Font.BOLD, 15));
btnTotal.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
count1++; count2++ ;count3++; count4++; count5++;
///For Foods … … …
if(count1 == 1){
Total_Foods = tValueOfCB + tValueOfBB + tValueOfCR + tValueOfVR + tValueOfMO + tValueOfNO;
Total_Valueof_Foods = String.valueOf(Total_Foods);
textFoodTotal.setText(Total_Valueof_Foods);
}
///For Drinks … … …
if(count2 == 1){
Total_Drinks = tValueOfCCO + tValueOfFAN + tValueOfTea + tValueOfHCoffee + tValueOfC_Coffee + tValueOfJuce;
Total_Valueof_Drinks = String.valueOf(Total_Drinks);
textDrinks.setText(Total_Valueof_Drinks);
}
///For Sub Total … … …
if(count3 == 1){
tFD =Total_Foods + Total_Drinks;
Sub_Total_Food_Drinks = String.valueOf(tFD);
textSubTotal.setText(Sub_Total_Food_Drinks);
}
///For Total … … …
if(count4 == 1){
Total_Food_Drinks = (Total_Foods + Total_Drinks);
Total_Food_Drinks = Total_Food_Drinks + (Total_Food_Drinks*.015);
Total_Food_Drinks_WithTax = String.valueOf(Total_Food_Drinks);
textTotalWithTax.setText(Total_Food_Drinks_WithTax);
}
if(count5 == 1){
try {
String query = “select Total from Total where Id=’1′ “;
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
String amount = rs.getString(“Total”);
double r = Double.parseDouble(String.valueOf(amount));
//System.out.println(r);
Account = r + Total_Food_Drinks;
String query2 = “Update Total set Total='”+Account+”‘ where Id=’1’ “;
PreparedStatement pst2 = con.prepareStatement(query2);
pst2.execute();
pst2.close();
//System.out.println(Account);
pst.close();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
btnTotal.setBounds(654, 213, 89, 34);
contentPane.add(btnTotal);
btn_Reset = new JButton(“Reset”);
btn_Reset.setBackground(Color.WHITE);
btn_Reset.setForeground(Color.BLUE);
btn_Reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
///For Foods … … …
textC_Bargur.setText(” “);
textB_Bargur.setText(” “);
textC_Roll.setText(” “);
textV_Roll.setText(” “);
textMoglay.setText(” “);
textNoodles.setText(” “);
chck_Chicken_Bargur.setSelected(false);
chck_Beef_Bargur.setSelected(false);
chck_Chicken_Roll.setSelected(false);
chck_Vegetable_Roll.setSelected(false);
chckMoglay.setSelected(false);
chckNoodles.setSelected(false);
///For Drinks … … …
text_C_Cola.setText(” “);
text_Fanta.setText(” “);
text_Tea.setText(” “);
text_H_Coffee.setText(” “);
text_C_Coffee.setText(” “);
text_Juce.setText(” “);
chck_Coca_Cola.setSelected(false);
chck_Fanta.setSelected(false);
chck_Tea.setSelected(false);
chck_Hot_Coffee.setSelected(false);
chck_Cold_Coffee.setSelected(false);
chck_Juce.setSelected(false);
///Total Calculation … … …
textFoodTotal.setText(” “);
textDrinks.setText(” “);
textSubTotal.setText(” “);
textTotalWithTax.setText(” “);
///All Value Assigning Zero
Total_Foods = 0;
tValueOfCB = 0; tValueOfBB = 0; tValueOfCR = 0; tValueOfVR = 0; tValueOfMO = 0; tValueOfNO = 0;
Total_Drinks = 0;
tValueOfCCO = 0; tValueOfFAN = 0; tValueOfTea = 0; tValueOfHCoffee = 0; tValueOfC_Coffee = 0; tValueOfJuce = 0;
tFD = 0;
Total_Food_Drinks = 0;
}
});
btn_Reset.setFont(new Font(“Harlow Solid Italic”, Font.BOLD, 15));
btn_Reset.setBounds(654, 257, 89, 34);
contentPane.add(btn_Reset);
btnExit = new JButton(“Exit”);
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnExit.setBackground(Color.WHITE);
btnExit.setIcon(new ImageIcon(SellAndCalculate.class.getResource(“/imgs/Exit.png”)));
btnExit.setForeground(Color.RED);
btnExit.setFont(new Font(“Harlow Solid Italic”, Font.BOLD, 15));
btnExit.setBounds(672, 505, 105, 34);
contentPane.add(btnExit);
btnBack = new JButton(“”);
btnBack.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
RAdmin rb = new RAdmin();
rb.setVisible(true);
}
});
btnBack.setIcon(new ImageIcon(SellAndCalculate.class.getResource(“/imgs/back1.png”)));
btnBack.setBackground(Color.WHITE);
btnBack.setBounds(10, 505, 105, 34);
contentPane.add(btnBack);
}
}
Be First to Comment