• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to create a program that provides average test scores  RSS feed

 
Erica Splitt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep getting an error that says variable can't be found, what am I missing? Help please?

 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Erica Splitt wrote:I keep getting an error that says variable can't be found, what am I missing? Help please?


The Java compiler gives much more information on what can't be found. It is probably better to provide the whole error message too.
Henry
 
Erica Splitt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good suggestion, thank you!

Here are the errors from my compiler.

testscores.java:52: error: cannot find symbol
CalculateB= new JButton("Calculate");
^
symbol: variable CalculateB
location: class testscores
testscores.java:54: error: cannot find symbol
calculateB.addActionListener(cbHandler);
^
symbol: variable calculateB
location: class testscores
testscores.java:90: error: cannot find symbol
pane.add (calculateB);
^
symbol: variable calculateB
location: class testscores
testscores.java:113: error: unexpected type
averageTF.setText(""=twoDigits.format(ave));
^
 
Ole Sandum
Ranch Hand
Posts: 76
3
IntelliJ IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have misspelled "calculate" in the variable declaration
 
Erica Splitt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh my goodness. I looked at that like 100 times lol. Thank you Kristian!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!