I made a custom JFrame with is an extension to the original JFrame with some modification including setting it to undecorated, resulting in having to add my own resize capabilities. My resizers works like it should except when i resize the frame where it also need to readjust the location of the frame, then it starts flickering which stops when you release the mouse to stop the resizing. If you resize it where the frame doesnt need to be relocated then this doesn't happen. Any help to fix this would be appriciated.
#Custom JFrame is flicking when resizing with own resizer
1 messages · Page 1 of 1 (latest)
<@&987246487241105418> please have a look, thanks.
is there someone on the way?
show some code & possible a gif/video of the problem
@languid shale Try enclosing your relocation code in SwingUtilities.invokeLater.
Already fixed it, the problem was that frame.getX() didn’t return the actual x position of frame but rather the relative location, whereas global coordinates were needed. Thank for looking though.