3 Replies - 219 Views - Last Post: 14 October 2012 - 05:06 AM Rate Topic: -----

#1 Sette  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 08-October 12

what should I do? my error is about cannot find symbol

Posted 14 October 2012 - 12:38 AM

CheckboxGroup optGroup = new CheckboxGroup();
Checkbox ki = new Checkbox("KING INASAL CARD(10% Discount)",false,optGroup);
Checkbox member = new Checkbox("MEMBER CARD(5% Discount)",false,optGroup);
Checkbox indigent = new Checkbox("INDIGENT CARD(20% Discount) ",false,optGroup);
add(ki);
ki.addItemListener(this);
add(member);
member.addItemListener(this);
add(indigent);
indigent.addItemListener(this);

public void itemStateChanged(ItemEvent e){
{

if(ki.getState())
a=1;

else if(member.getState())
a=2;

else if(indigent.getState())
a=3;

}






Posted Image

Is This A Good Question/Topic? 0
  • +

Replies To: what should I do? my error is about cannot find symbol

#2 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 583
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: what should I do? my error is about cannot find symbol

Posted 14 October 2012 - 12:52 AM

View PostSette, on 14 October 2012 - 05:38 PM, said:

CheckboxGroup optGroup = new CheckboxGroup();
Checkbox ki = new Checkbox("KING INASAL CARD(10% Discount)",false,optGroup);
Checkbox member = new Checkbox("MEMBER CARD(5% Discount)",false,optGroup);
Checkbox indigent = new Checkbox("INDIGENT CARD(20% Discount) ",false,optGroup);
add(ki);
ki.addItemListener(this);
add(member);
member.addItemListener(this);
add(indigent);
indigent.addItemListener(this);

public void itemStateChanged(ItemEvent e){
{

if(ki.getState())
a=1;

else if(member.getState())
a=2;

else if(indigent.getState())
a=3;

}






Posted Image

Where in the code do you declare a?
Was This Post Helpful? 0
  • +
  • -

#3 Sette  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 08-October 12

Re: what should I do? my error is about cannot find symbol

Posted 14 October 2012 - 01:17 AM

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


public class MCERC extends Applet implements ItemListener,ActionListener{
Label	lblName1, lblName2, lblName3;
Checkbox	chkButton1, chkButton2, chkButton3, chkButton4;
TextField	TxtTpqty, TxtTpP, TxtLgqty, TxtLgP, TxtTcqty, TxtTcP, TxtHtqty, TxtHtP, TxtDsqty, TxtDsP, TxtSqty, TxtSP, TxtBqty, TxtBP, TxtNqty, TxtNP, TxtKkqty, TxtKkP, TxtMqty, TxtMP, TxtHcqty, TxtHcP, TxtHcHqty, TxtHcHP, TxtSdAqty, TxtSdAP, TxtJqty, TxtJP, TxtFlqty, TxtFlP, TxtFrAmt, TxtFrqty, TxtFrP, TxtSuAmt, TxtSuqty, TxtSuP, TxtBurAmt, TxtBurqty, TxtBurP, TxtPiAmt, TxtPiqty, TxtPiP, TxtErAmt, TxtErqty, TxtErP, TxtTotal1, TxtTotal2, TxtTotal3, TxtTotal4, TxtDis, TxtTi, TxtTa, TxtAr, TxtTc;
Button	cmdTp, cmdLg, cmdTc, cmdHt, cmdDs, cmdS, cmdB, cmdN, cmdKk, cmdM, cmdHc, cmdHcH, cmdSdA, cmdJ, cmdFl, cmdFr, cmdSu, cmdBur, cmdPi, cmdEr, cmdCompute, cmdReset, cmdPay;
List	lstBox1, lstBox2, lstBox3, lstBox4, lstBox5;
String varListItem1, varListItem2, varListItem3, varListItem4, varListItem5;
int a;


public void init(){
setLayout(new GridLayout(10,10));


Was This Post Helpful? 0
  • +
  • -

#4 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2198
  • View blog
  • Posts: 5,226
  • Joined: 10-September 10

Re: what should I do? my error is about cannot find symbol

Posted 14 October 2012 - 05:06 AM

Post the exact error and stack trace (copied and pasted), enough code to see the source code referenced by the stack trace (point it out by line number in the posted code, if necessary), and provide any details necessary to explain the question in addition to the thread title.

As it is, we're hunting for a needle in a haystack, and we can't be sure we're even looking for a needle or that we're looking in the right haystack.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1