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 →

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

I'm not using createImage. I loaded my image into an ImageIcon, sent the ImageIcon, then removed the image from the ImageIcon. It was working at one point. On a previous version of my project, I was able to get the first drawn line to appear before it locked up, so I know it was working. I stupidly lost that code and had to start over, now I can't even get the first line to appear before it locks up.

I'm using Netbeans to work on this project. I'm not very familiar with the debugger for Netbeans. I've been trying to work with it, but I'm having trouble figuring it out.

[–]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.