• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!

 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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??
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Had you used the [code] tag- It might have been easier for us to track the code
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I've edited the post so enri can see the improvement.
reply
    Bookmark Topic Watch Topic
  • New Topic