twc
Posts: 129
Nickname: twc
Registered: Feb, 2004
|
|
Re: new user's error
|
Posted: Apr 24, 2004 8:05 PM
|
|
You haven't listed enough code for me to be absolutely positive what the error refers to, but I can explain what the general error message means and perhaps you can find the specific error yourself.
Basically, you are trying to call an instance method in the same fashion that you would call a class (static) method. For example, lets imagine that you create a JLabel JLabel myLabel = new JLabel("I am a label");
If you decide to change the text, you can call the setText(String) method. Here is a right and wrong example. myLabel.setText("This is the new text"); //RIGHT - called by object JLabel.setText("This is the new text"); //WRONG! - called from class
The setText(String) method is an instance method because it sets the text of a specific JLabel. You cannot call that method from the class, you must use the name of the object. The first example above will work, but the other will cause an error like the ones that you are getting.
I suspect that you are making a similar error. Here is what I think is the problem.
Customer.findCustomer(newList) should be newCustomer.findCustomer(newList)
Customer.addCustomer(newList) should be newCustomer.addCustomer(newList)
SalesRegion.getList() needs to be someObjectName.getList() where someObjectName is something that you have declared and instantiated elsewhere.
Remember, I'm guessing about quite a bit because I don't have all of the code. I hope this helps.
twc
|
|