This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion forum!
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:
subject: JDialog
jQuery in Action, 3rd edition