I added a jDialog Swing Form to my project as in this image :

and now I want to get the value from that jtextField to the parent JFrame when I close this JDialog, I googled about it and I found this :
Object obj=sasirMdp.showDialog();
but the compiler tells me that there is no method named showDialog in my JDialog.
and when I added this method to the JDialog class :
ReturnValue showDialog() {
setVisible(true);
return result;
}
the copmiler tells me if I want to create the class ReturnValue.
Please if some one knows how to get that value from the JDialog, I'll be thankful.