Hi to all, this is the code....I use eclipse that has warned me of this error:The method add(Component) in the type Container is not applicable for the arguments
(Class) at the line 09 of Main.java
What i can do to fix it?
I had this same exact error in my code when my IDE actually should have not been throwing the error at all to begin with. When I was using Eclipse, I got rid of this error by closing and moving any other projects that I had open currently. Since my other project that was open was dealing with very similar code to my New Project I just recently made, I think my IDE was confused. So I closed the other project I had open already, copied all my code in the java class file with the error, then deleted that java class file with the error, then remade a new java class file with the same name, and pasted the code back in and then my error was gone.
My other project = code was working
New Project = Same exact code as other project, but wasnt working...
Good luck and hope this helps any.
My pie came with a little toothpic holding up this tiny ad: