Eclipse is, or if you were to try to compile the code you've posted, the compiler would be, telling you more than you're telling us. Helping you understand and overcome errors is easier if you see and post the complete error.
Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
People will be better able to help you if you TellTheDetails(←click), such as copy/pasting the exact, complete error messages.
In this case, I can take a reasonable guess. Both error messages are probably telling you exactly what's wrong--that in one case you're trying to invoke a constructor that doesn't exist, and in the other you're trying to invoke a method that doesn't exist.
jlistm extends Object, and if you look at the docs for Object, you'll see that it doesn't have a c'tor that takes a String argument.
Similarly, you have not defined a setLayout() method on your jlistm class, and it's not inheriting any such method from its superclass (Object), so there is no such method on that class.
Does that give you a hint as to what you might have done wrong? (And note that I didn't tell you anything that wasn't in the error messages.)
... wow, you said almost the exact thing the error message said. nice,
i was pretty dumb, didnt look close enough at my code. i forgot to extend the classs that
had the method i was using,i think. still gotta go back and relearn a lot of this stuff.
still dont quite get what a constructor does
levi sleight wrote:still dont quite get what a constructor does
A constructor is a special block of code that gets executed when a new instance of the class is created. You normally use it to initialize the member variables of the object. See Providing Constructors for Your Classes in Oracle's Java Tutorials for more details.