Hello Krupa, and welcome to the Ranch! For posting code here, please UseCodeTags <-- link so that your code retains its formatting. Since you're new here, I've added them for you. It would also encourage more members to read your code if you format it in a consistent way: use spaces (2 to 4) for indents and don't mix tabs and spaces in the same block of code; don't post extraneous blank lines, and adopt a consistent bracing style.
Do you have a question, or a problem we can help you with? I do see that you are constructing an ImageIcon only for the sake of retrieving its Image; why don't you load the Image directly?
edit You also have a constructor call within the same constructor, which is going to lead to infinite recursion and a stack overflow. If that's what's troubling you you should say so.
There are no new questions, but there may be new answers.
Joined: Apr 18, 2012
My question is: Each time you mouse click on the screen it should add a daffodil to the field.
Don't I have to create an ImageIcon object then call getImage() to retrieve the image object!
I don't know how to put it in the code.