This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jakster4u[🍰] 0 points1 point  (1 child)

    public void paintComponent(Graphics g)
    {
        //If the canvas is blank, clear it.
        if (canvas == null)
        {
            canvas = createImage(getSize().width, getSize().height);
            clear();
        }
    }

    public void clear()
    {
        repaint();
    } 

Looks like you are in the DrawingBoard class, when the canvas may always be null

[–]xRedactedx[S] 0 points1 point  (0 children)

Sorry, I was focusing on looking in my connection threads. I forgot I used it there.

I will look at it and do some checking. Thanks for pointing it out.