This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please rescue me out

 
jide agboola
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to build a simple calculator with three textFields, for data X and Y to yield result Z on the third TextField, with five Buttons for each arithmetic operator and clear button.

This is my code


i have only added Listerner to the add button.
i dont know i still keep getting errors.
Thanks
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
remove everything unrelated to the construction of the gui
e.g.
x.getText(dataX);
all the listener code

now you can concentrate on getting the gui to display.
when it diaplays OK, then add the listeners/functionality
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic