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 …

Member Avatar
Member Avatar
-1 forum 4

In my java code I get this error. Enyone fix it for me Plz? cannot find symbol `:method getSelectedItem()` 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,lblamt,lblbal,lblavilability; Button b1,b2,b3,b4,b5,b6,b7,btnref; Choice choice1; Checkbox ch1,ch2,ch3,ch4,ch5; float num,money,change; CheckboxGroup cbg,cbg1; TextField txtamt1,txtbal,txtfoot,txtavilability; float itemprice=20; public int cola_10oz_reg =3; public int cola_10oz_die =3; public int cola_16oz_reg =3; public int cola_16oz_die =3; public int org_10oz_reg =3; public int org_16oz_reg =3; public int org_10oz_die =3; public int org_16oz_die =3; public int lim_10oz_reg =3; public int lim_16oz_reg =3; public void init() { lblhead = …

Member Avatar
Member Avatar
+0 forum 2

Does java has toString function? eg : txtamt.setText(toString(num)); But it doesn't work. Plz give me the right method.

Member Avatar
Member Avatar
+0 forum 2

I created a java Applet. It has an error. The error is applet not initialized. I need urgent help for this error. I created the interface using netbeings & coppied the code to the Jcreater. :(

Member Avatar
Member Avatar
+0 forum 5

How to use ActionListener and ItemListener together in one java program??

Member Avatar
Member Avatar
+0 forum 2

The End.