hey m working on a project where i have to centralise my dialog box with respect to its frame .i.e. when I restore down my frame i want the dialog box to get at its center(the frame's center ) give a specific General code how to do it this is what I tried but it aint working
if(u>1)
{
final JFrame frame = new JFrame("multiple pagetable changes!!!");
frame.setLocationByPlatform(true);
final JOptionPane pane1= new JOptionPane(change_log);
final JDialog d1 = pane1.createDialog(frame,"");
d1.pack();
d1.setLocationRelativeTo(null);
d1.setVisible(true);
}