• Post Reply Bookmark Topic Watch Topic
  • New Topic

"Unresolved compilation problems: Panel cannot be resolved to a type"  RSS feed

 
enrique garcia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys, I have been giving it a try for a while now, but I really don't know what's wrong with my code :/ I mean, I think the code is actually ok, but maybe I have to import something more, or possibly implement a listener somewhere?? It would be great if you show me my mistake!

 
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
//this is where the mistake is shown:
//Multiple markers at this line
//MeinZeichenPanel cannot be resolved to a type


This means that it can't find the class. If the class is in a different package, then you need to import it. Otherwise, I would check the class path to confirm.

Henry
 
enrique garcia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Henry, thank you for your swift reply. The code quoted is all the code I wrote. The classpath is ok, because other codes worked already. The problem is, I still don't know what to do, do you mean I have to reference the class MeinZeichenPanel in any way? How??
 
Mohamed Sanaulla
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This seems to be from a different package- You need to include an import statement for this class. Also this class needs to be in the classpath.
 
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
enri Fsfaed wrote:Hi Henry, thank you for your swift reply. The code quoted is all the code I wrote. The classpath is ok, because other codes worked already. The problem is, I still don't know what to do, do you mean I have to reference the class MeinZeichenPanel in any way? How??


Well, in order to use the MeinZeichenPanel, you have to have it somewhere. It is not a class that is built into the core java libs.

Henry
 
enrique garcia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mh, so it is not enough with saying
class meinZeichenPanel extends JPanel {
but how do I include an import statement for this class?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
enri Fsfaed wrote:mh, so it is not enough with saying
class meinZeichenPanel extends JPanel {
but how do I include an import statement for this class?



Oh that.... didn't see that.

Hint: Java is case sensitive.

Henry
 
enrique garcia
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cool, didn't know that. Thank you very much , I was wondering for quiet a while now
 
Mohamed Sanaulla
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Had you used the [code] tag- It might have been easier for us to track the code
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I've edited the post so enri can see the improvement.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!