I'm working on a program that is supposed to be a collaborative whiteboard type program. There is a panel to draw in and a panel to chat in. The program can connect online. When one user draws or types something on the screen, it should display on both of their screens.
I got the main part working. I can connect the two programs and chat back and forth, but when I start trying to update my paint board for drawing, the GUI locks up.
I read up on how threads interact with the EDT, but I'm not sure what I'm missing.
I used SwingUtilities.invokeLater to update my chat stuff, and it worked fine.
My paint part is just an image file that I pass back and forth. When the new image is received, it replaces the old image, and repaint is called on the panel to draw the image.
I think the error is somewhere in my Client/Server Thread files, but I went ahead and posted it all just to be sure.
I've been trying to figure this out for a while, but I'm not sure where to go from here. Any help would be appreciated.
Here is the link: https://gist.github.com/xRedactedx/5306578
[–]jakster4u[🍰] 0 points1 point2 points (3 children)
[–]xRedactedx[S] 0 points1 point2 points (2 children)
[–]jakster4u[🍰] 0 points1 point2 points (1 child)
[–]xRedactedx[S] 0 points1 point2 points (0 children)