What return type should this method be or what should the method be "called"
public ImageIcon(String filename){
you either haven't declared a return type or have not "named" it.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224
How do you mean, I don't understand what you are saying? Could you say it on a different manner so I know what you meant. I have to return the value of String filename. So getImage could read it. Thanks for your help :)
Greets
MeandJava
How far along are you suppossed to be in your class?
In any case, what difference do you see between
public ImageIcon(String filename){
and this
public Image getImage(String path){
The second one is correct, declaring both a return type and a name. The first one is missing one of those (seemingly the name).
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494