centering JDialogs

I have a question about centering JDialogs. If I create a JDialog with a parent JFrame, shouldn't the dialog appear in the center of the parent JFrame?The JDialogs that make always appear in the upper left corner of the screen...Can someone help me with this?
[281 byte] By [JNooreza] at [2007-10-3 4:05:42]
# 1
You can use this to center your dialog: dialogName.setLocationRelativeTo(null); You can also use this same command for frames.
Jason102a at 2007-7-14 22:05:03 > top of Java-index,Desktop,Core GUI APIs...
# 2
Learn to search the forum before posting questions. This question is asked to frequently.Using the keywords "jdialog center" I found the answer in the first posting I read. You could have had your answer in minutes instead of hours with a little effort.
camickra at 2007-7-14 22:05:03 > top of Java-index,Desktop,Core GUI APIs...