I have written a simple code with a JFrame displaying an image. The problem I am facing is that the image does not appear when I execute the code. At first the JFrame is blank. If I now resize the JFrame, the image is displayed. Could you guys help me figure out the problem please.
Why don't you read the section from the Swing tutorial on "How to Use Icons" and download the example from there to see if it works properly in your environment.