• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dialog Class - Need an Example..  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am lookin for Example on How to use Dialog Class?
a) Is Dialog a Component?
b) How to add Dialog to a Container?
Expecting answer from Bartender!!!
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<CODE>Dialog</CODE> is a subclass of <CODE>Window</CODE> therefore it cannot be added to a <CODE>Container</CODE>. It's the exception, BTW.
<CODE>Window</CODE> is also a <CODE>Component</CODE> since it is a <CODE>Container</CODE>.
Please refer to the AWT class hierarchy in my Web page dedicated to Java Programmer Certification.
To see a <CODE>Dialog</CODE> in action go to my HTTP Header Applet page and clear out the URL field and hit ENTER. You'll get a <CODE>Dialog</CODE> with an error message.
The code is freely available.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!