jQuery in Action, 3rd edition
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


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
sayan maity

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

I agree. Here's the link: http://aspose.com/file-tools
subject: JDialog
It's not a secret anymore!