I've soome buttons in my coding. It has some values. I want to add those val & display in a text box. When u press a button the amt has to be calculated. I tried bt it's not working.How can I do this? I need quick reply. This is my code.

import java.awt.*;
import java.awt.event.*;
import java.applet.*;

public class soda extends Applet implements ActionListener, ItemListener {
Label lblhead,lblfoot,lblsize,lbltype;
Button b1,b2,b3,b4,b5,b6,b7,btnbal;
Choice choice1;
Checkbox ch1,ch2,ch3,ch4,ch5;
double num=0,money;
CheckboxGroup cbg,cbg1;
TextField txtamt,txtbal;

public void init() {
Label lblhead = new Label();
cbg = new CheckboxGroup();
ch1 = new Checkbox("COLA", cbg, false);
ch2 = new Checkbox("ORANGE", cbg, false);
ch3 = new Checkbox("LIME", cbg, false);
Button    b1 = new Button();
Button    b2 = new Button();
Button    b3 = new Button();
Button    b4 = new Button();
Button    b5 = new Button();
Button    b6 = new Button();
Button    b7 = new Button();
Choice    choice1 = new Choice();
choice1.add("10 oz");
choice1.add("16 oz");

Label    lblsize = new Label();
Label    lbltype = new Label();
cbg1 = new CheckboxGroup();
ch4 = new  Checkbox("Regular", cbg, false);
ch5 = new Checkbox("Diet", cbg, false);
Label    lblamt = new Label();
TextField    txtamt = new TextField();
Button    btnbal = new Button();
TextField    txtbal = new TextField();
Button    btnref = new Button();
Label    lblfoot = new Label();

setBackground(new Color(255, 153, 153));
setLayout(null);

lblhead.setAlignment(Label.CENTER);
lblhead.setFont(new Font("Calibri", 1, 18));
lblhead.setText("Soda Vending Machine");
add(lblhead);
lblhead.setBounds(80, 30, 230, 30);

add(ch1);
ch1.setBounds(60, 70, 58, 20);

add(ch2);
ch2.setBounds(60, 100, 77, 20);

add(ch3);
ch3.setBounds(60, 130, 53, 20);

b1.setBackground(new Color(0, 153, 153));
b1.setLabel("RM 00.10"); ...
peter_budo commented: MIssing code tags, bad for you... -2