I know this is very basic question but I can't get a clear example.
I have created a class that extends JDialog.
I want to create an instance of it from within a JPanel which has as it's
ultimate parent a JFrame.
How do I get the "owner" or first parameter for the super() call? I tried
getContentPane() but then I get a compiler error.
I'm not finding enough documentation in my reference books to understand
what it needs.
Thanks,
public class IngrIdentDialog extends JDialog {
public IngrIdentDialog( Dialog parent, String title,
boolean modal, Vector data ) {
super( parent, title, modal );
} /* ...end of public constructor IngrIdentDialog... */
} /* ...end of class declaration IngrIdentDialog... */
-------------------------------------
IngrIdentDialog dialog = new IngrIdentDialog( getContentPane(),
"a title",
true );
I have created a class that extends JDialog.
I want to create an instance of it from within a JPanel which has as it's
ultimate parent a JFrame.
How do I get the "owner" or first parameter for the super() call? I tried
getContentPane() but then I get a compiler error.
I'm not finding enough documentation in my reference books to understand
what it needs.
Thanks,
public class IngrIdentDialog extends JDialog {
public IngrIdentDialog( Dialog parent, String title,
boolean modal, Vector data ) {
super( parent, title, modal );
} /* ...end of public constructor IngrIdentDialog... */
} /* ...end of class declaration IngrIdentDialog... */
-------------------------------------
IngrIdentDialog dialog = new IngrIdentDialog( getContentPane(),
"a title",
true );