Thanks sir, its working now.
But now im facing a new problem that i have placed some components on a JPanel
and im not able to see those components except TextFields.
It seems that the image is overlapping the components.
The layout is BorderLayout.CENTER, but the TextFields appears on the top of the JFrame.
How can I get those components Visible and at the center of the screen.