I have a JDialog which contains JPanel and other elements like JTextField. I want to move JDialog from one location to another after it is loaded on screen. When I try to use jdialog.setLocation(), I am not able to move JDialog and also all other components added to it becomes invisible.
Can anyone tell me what might be wrong with my approach?
Regarding Gilbert’s assertion that a dialog can’t be moved after being set visible, please run this:
Note that the animation Swing Timer must be started before calling setVisible(true). Perhaps that is what Gilbert was referring to.