I am unable to initialise an applet when I set icon to a JLabel. The same code is running fine for JFrame. When I run the following code, it says "Applet not initialised". The image is in the same folder as that of the class file.
Per the applet tutorials, Sun recommends that Swing components be initialized on the EDT (Event Dispatch Thread) and inside an invokeAndWait method to allow time for the applet to initialize. So if you do this, does it work? e.g.,
Also, you may need to be careful with getting the ImageIcon this way if you plan to put the applet into a Jar.