What code will facilitate making a JDialog unmovable? I’ve looked at two options:
setUndecorated(true);which works but removes all the trimmings.addComponentListenerand overriding thecomponentMoved()method, which causes theJDialogto subsequently callinduceEpilepticSeizure()upon moving.
Any ideas?
My first instinct is – you can’t unless you DO use setUndecorated(true)… You could manually put some trimmings there, but, well, UGH!
So if you want the native trimmings AND you want it immovable without the horrible flickering from using a component listener, I think you can’t.
You could create a border manually that LOOKS like the default border…here’s an example of how to do it, although I’ve intentionally made the border look like the ugliest thing you’ve seen all day. You’ll need to find the right combination of BorderFactory calls to achieve what you want to do.