Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    Making the changes I suggested I get this image:
  2. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    Its a waste of time posting code that does not compile, execute and show the problem.
    The posted code would not show the problem. It would get a NPE.
  3. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    Check the code in paintAgain(). Is this what you want:

    if (art == null)
  4. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    Try removing the Graphics parameter for the paintAgain() method since it is never used.
  5. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    I based my statement on the above code. It looks like it was coded without defining a variable g and giving that variable a value.

    Why does the paintAgain() method need an arg? It looks like it...
  6. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    Where is the variable: g defined that is in scope (within the same pair of {}s) as where it is being used?

    It looks like you are trying to write code without understanding what the different parts...
  7. Replies
    18
    Views
    1,839

    [SOLVED] Re: JPanel's BufferedImage Comes Then Goes

    The paintAgain() method takes a Graphics object for an arg. There is no Graphics object available in the constructor. The paintComponent() method has one. Try calling it from inside the...
Results 1 to 7 of 7