I am having one parent frame in my system and one dialog that I need to show on Click. But I need to show that dialog in the middle of the parent frame. All time. And that parent frame position may not be the same all the time. So how to set it all time in to the middle?
I am Working on Swing JFrame
.
com.verve.visdashboard.NewOkCancelDialog cancelDialog = new com.verve.visdashboard.NewOkCancelDialog(new FrameOwnserPnael(), true);
cancelDialog.setLocationRelativeTo(new FrameOwnserPnael());
cancelDialog.setLocationByPlatform(true);