This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDialog  RSS feed

 
kalai sundar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change the icon of the JFrame to the one you want in the dialog box, then

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!