Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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.
  2. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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.
  3. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    A common mistake is to load the images every time they are displayed instead of doing it one time.
  4. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    Take out the call to sleep(4000)

    No idea without seeing the code.
  5. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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)...
  6. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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...
  7. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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...
  8. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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.
  9. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    Can you post the source code that has the error?
    And the full text of the compiler's error messages.
  10. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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...
  11. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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...
  12. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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...
  13. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    Did you read post#3 about applets and browsers and appletContext?

    Unless you provide the services of the appletcontext, its methods will not work.
  14. [SOLVED] Re: Images works on an applet, but doesn't work when an applet is in a JFrame.

    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...
Results 1 to 14 of 14