• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFC  RSS feed

 
dubey vandana
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
How to place icons/gif of our choice in JDialog box? For example, if i want to place smileys in my Open File dialog box then what to do?
rasap
thanx
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are talking about on the title bar of a JDialog, that is set to be the same as the icon on the title bar of the JDialog's parent Frame. To change the icon on the JDialog's parent Frame, call setIconImage( Image ) on it.

If you want to add an image in the contentPane of the JDialog, just add an ImageIcon to a JLabel and ad the JLabel to the JDialog.

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