Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25
Like Tree8Likes

Thread: "error: cannot find symbol e"

  1. #21
    adiotrox is offline Member
    Join Date
    Feb 2012
    Posts
    43
    Rep Power
    0

    Default Re: "error: cannot find symbol e"

    nothing happened it's running and addition is not getting performed

  2. #22
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,517
    Blog Entries
    7
    Rep Power
    20

    Default Re: "error: cannot find symbol e"

    Quote Originally Posted by adiotrox View Post
    nothing happened it's running and addition is not getting performed
    Did you read my hint? Another hint: are you comparing the source of the event (getSource()) against your buttons?

    kind regards,

    Jos
    adiotrox likes this.
    cenosillicaphobia: the fear for an empty beer glass

  3. #23
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default Re: "error: cannot find symbol e"

    Doesn't e.getSource() return the object where the event was called i.e. the JButton object?

    e.getSource() != b; because the local variable above 'b' hides the class variable b (the JButton), and the local variable b you've defined as:
    int b=Integer.parseInt(t1.getText());

    edit:
    sorry for giving that away, i had this post open from before your new posts (Jos)
    adiotrox likes this.

  4. #24
    adiotrox is offline Member
    Join Date
    Feb 2012
    Posts
    43
    Rep Power
    0

    Default Re: "error: cannot find symbol e"

    Thanks Jos you rock..

  5. #25
    adiotrox is offline Member
    Join Date
    Feb 2012
    Posts
    43
    Rep Power
    0

    Default Re: "error: cannot find symbol e"

    Thanks Ozzyman for your concern you made it crystal clear for me

Page 2 of 2 FirstFirst 12

Similar Threads

  1. "Cannot find symbol" error
    By MBD in forum New To Java
    Replies: 5
    Last Post: 09-27-2011, 02:41 PM
  2. "cannot find symbol" error
    By droidus in forum New To Java
    Replies: 2
    Last Post: 09-07-2011, 07:43 AM
  3. Replies: 5
    Last Post: 04-24-2011, 03:21 PM
  4. Error "can not find symbol variable"
    By FullMetalHollow in forum New To Java
    Replies: 5
    Last Post: 10-04-2009, 09:51 PM
  5. "Cannont find symbol Constructor" error
    By Welsh in forum New To Java
    Replies: 7
    Last Post: 01-25-2008, 12:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •