Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with a simple compiler error...  RSS feed

 
David J. Gonzo
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am designing a simple program where a user can enter a word or phrase and the program determines if it is a palindrome. A palindrome is a word or phrase that is spelled the same both forwards and backwards...

This is the compile error:

Palindrome.java:165: cannot resolve symbol
symbol : class About
location: class Palindrome
new About(this).setVisible(true);


And here is my code:


Appreciate any help....
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you defined a class named About in the same package as the Palindrome class? The compiler error is telling you that it does not know the definition of the symbol "About." As you're using it, it should be a class that extends a JComponent of some sort, like Palindrome does (JFrame is a JComponent I believe).
 
David J. Gonzo
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

Your information helped me solve the problem
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!