File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialog" Watch "JDialog" New topic
Author

JDialog

kalai sundar
Ranch Hand

Joined: May 25, 2005
Posts: 69
Is there nay methid to seticon fro Jdialog box. For eg, in case of JFrame, using setIcon method we will set the set incon, i want to set icon for the JDialong box, how i can do that, can anyone help me.


with regards
kalai
sayan maity
Greenhorn

Joined: Mar 03, 2005
Posts: 28
You cannot add icon to the JDialog. It does not support that as it has few predefined icons like question mark, exclamation etc. Instead you can declare one frame and use setIcon method on the frame. Attach whatever necessary buttons are required and actionlistener to those buttons.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
change the icon of the JFrame to the one you want in the dialog box, then

 
jQuery in Action, 2nd edition
 
subject: JDialog