Yes I am SCJP and I can't even compile this single line of code!!!!!
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Okay, I must be blind, or my Java compiler is whacked. Why in the name of the heavens won't this stupid code COMPILE??? I have been doing all kinds of swing stuff in this directory, and now all of a sudden this happens:
import javax.swing.*;
public class Frustrated extends JComponent implements Runnable
{
// Copied DIRECTLY from java api docs!!!
EventListenerList listenerList = new EventListenerList();
}
The compiler keeps complaining:
C:\classes\Frustrated.java:20: cannot resolve symbol
symbol : class EventListenerList
location: package swing
javax.swing.EventListenerList listenerList = new javax.swing.EventListenerList();
WHAT DO YOU MEAN YOU CAN'T RESOLVE THE CLASS EVENTLISTENERLIST ??? ITS A STANDARD JAVA CLASS!!!
GRRRRRRRRRRRRRRR!
Well, I feel a little better now ... but I think I need a new keyboard. Anyway, I would be grateful to anyone that can point out my stupidity in this case ...
Dan
import javax.swing.*;
public class Frustrated extends JComponent implements Runnable
{
// Copied DIRECTLY from java api docs!!!
EventListenerList listenerList = new EventListenerList();
}
The compiler keeps complaining:
C:\classes\Frustrated.java:20: cannot resolve symbol
symbol : class EventListenerList
location: package swing
javax.swing.EventListenerList listenerList = new javax.swing.EventListenerList();
WHAT DO YOU MEAN YOU CAN'T RESOLVE THE CLASS EVENTLISTENERLIST ??? ITS A STANDARD JAVA CLASS!!!
GRRRRRRRRRRRRRRR!
Well, I feel a little better now ... but I think I need a new keyboard. Anyway, I would be grateful to anyone that can point out my stupidity in this case ...
Dan
Dan Temple
Ranch Hand
Posts: 93
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Okay! I had some juice and thought about it. I got it, I got it. I thought EventListenerList was in the package javax.swing, but in reality I have to import javax.swing.event. Doh! Sorry for the short curcuit there ... it was one of those days, you know?
Dan
Dan
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Dan
We all understand, it's a lot like looking for the mysterious error in your code that the compiler put there only to find out that it's really the semi-colon you forgot.
It was soemthing like that that got my assembly language book severley damaged. Of course the repeated slamming of it on the floor didn't help either.
glad you found your answer
------------------
Dave
Sun Certified Programmer for the Java� 2 Platform
We all understand, it's a lot like looking for the mysterious error in your code that the compiler put there only to find out that it's really the semi-colon you forgot.
It was soemthing like that that got my assembly language book severley damaged. Of course the repeated slamming of it on the floor didn't help either.
glad you found your answer
------------------
Dave
Sun Certified Programmer for the Java� 2 Platform
Dave
posted 24 years ago
God - I feel better now! Nice to know that I'm not the ONLY one who has those days. 
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Dan Temple:
... it was one of those days, you know?
God - I feel better now! Nice to know that I'm not the ONLY one who has those days. 
"JavaRanch, where the deer and the Certified play" - David O'Meara
| I've got no option but to sell you all for scientific experiments. Or a tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |










