This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Ruchi please use code tags next time you post your code. The code below shows how to add image to the panel. May help you out.
You just override the JPanels paint method. The above code sets the image totally as the background. If your requirement is to set the image as just a icon, then you can use the JLabel, and the component to the panel.