Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CartGui extends JFrame implements ActionListener {
- GridLayout Grid = new GridLayout(7,2);
- JFrame MainFrame = new JFrame();
- Container Container = getContentPane();
- JCheckBox Buck = new JCheckBox("Buck");
- JCheckBox A = new JCheckBox("A");
- JCheckBox Roo = new JCheckBox("Roo");
- JCheckBox Bon = new JCheckBox("Bon");
- JCheckBox Zai = new JCheckBox("Zai");
- JTextField FldBuck = new JTextField("0");
- JTextField FldA = new JTextField("0");
- JTextField FldRoo = new JTextField("0");
- JTextField FldBon = new JTextField("0");
- JTextField FldZai = new JTextField("0");
- JTextField FldOrderTotal = new JTextField();
- JButton CheckOut = new JButton("Check Out");
- JButton Disabled = new JButton();
- double PriceBuck = .5;
- double PriceA = 1;
- double PriceRoo = 2;
- double PriceBon = 5;
- double PriceZai = 10;
- double Total = 0;
- int QtyBuck = 0;
- int QtyA = 0;
- int QtyRoo = 0;
- int QtyBon = 0;
- int QtyZai = 0;
- ACTIONPERFORMED BULLSHIT
- if(e.getSource()== CheckOut){
- QtyBuck = Integer.parseInt(FldBuck);
- Total = (PriceBuck*QtyBuck)+(PriceA*QtyA)+(PriceRoo*QtyRoo)+(PriceBon*QtyBon)+(PriceZai*QtyZai);
- FldOrderTotal.setText(String.valueOf(Total));
- }
Add Comment
Please, Sign In to add comment