wood burning stoves 2.0*
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
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

 
wood burning stoves
 
subject: JDialog
 
Similar Threads
Picture as Button?
Get Image on a JLabel
title bar icon on a JDialog box
setting the frame icon to JDialog windows
JDialog is blank whilst other tasks are running