aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes What is going on here? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "What is going on here?" Watch "What is going on here?" New topic
Author

What is going on here?

Unnar Björnsson
Ranch Hand

Joined: Apr 30, 2005
Posts: 164
All the sudden this simple code doesn�t work!


It worked just a minute ago, now when I compile it I get
"cannot find symbol
symbol : constructor Timer(int,Test3.TimeListener)
location: class Timer
timer = new Timer(20, new TimeListener());"

Cannot find constructor!! It is right there:

Timer(int delay, ActionListener listener)

I provided it with an integer and a class the implements ActionListener.
Anyone have a clue?

[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Test3 test = new Test(); //missing a 3?
Test3 test = new Test3();
Unnar Björnsson
Ranch Hand

Joined: Apr 30, 2005
Posts: 164
This program�s name was initially Test I changed it to Test3 and forgot that little detail. However the error still occurs.
[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
it compiles OK for me.
your error message can be reproduced if you remove
implements ActionListener

but, as you say, it's there
??
Unnar Björnsson
Ranch Hand

Joined: Apr 30, 2005
Posts: 164
I found out what was causing this error. I had extracted Timer.class(The one from java.util, which does NOT include this particular constructor) from SRC.ZIP and for some reason put it in my working folder. Two Timer classes, I don�t get it why they have to share the same name.
[ September 15, 2005: Message edited by: Unnar Bj�rnsson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is going on here?