Don't load them twice.
Put the load of the images in a method that is only called one time.
Define the image variables as class variables.
Type: Posts; User: Norm
Don't load them twice.
Put the load of the images in a method that is only called one time.
Define the image variables as class variables.
Are you changing a List while iterating through it?
Have you read the API doc for that exception? Its doc is in with the doc for all the classes.
A common mistake is to load the images every time they are displayed instead of doing it one time.
Take out the call to sleep(4000)
No idea without seeing the code.
Get rid of the applet class's methods and use the ImageIO class's read methods to read the image files.
Will the images be in the jar file or outside of it?
If inside you should use the read(URL)...
Those methods are for applets. If you are not going to execute the code as an applet in a browser, you need to get rid of those methods and use methods suitable for applications. Don't extend the...
Are you trying to draw images or display an existing image? if you want your applet to work without a browser, then you would continue doing what I have suggested. It will take more code that way...
The code for setting the AppletStub goes with the applet you are using in post#1. Not in the AppletStub class.
After you create an instance of your applet class, call its setStub() method.
Can you post the source code that has the error?
And the full text of the compiler's error messages.
Create an instance of your applet class:
yourApplet = new YourApplet();
Call its setStub() method passing it an instance of your class that implements AppletStub.
yourApplet.setStub(new...
Ask google
An idea:
Create a class that implements AppletStub. Create an instance of your applet class and call its setStub() method passing it an instance of your class that implements...
If you are not going to use the applet code in a browser that provides the applet stub and context, then you will need to rewrite the code so it does not extend the applet class or use any of the...
Did you read post#3 about applets and browsers and appletContext?
Unless you provide the services of the appletcontext, its methods will not work.
Please post the full text of any error messages.
Applets require the services of an AppletContext normally provided by a browser. Unless you create an appletcontext and set it for the applet, the...