This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes HELP - JDialogs! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "HELP - JDialogs!" Watch "HELP - JDialogs!" New topic

HELP - JDialogs!

Dave Donohoe
Ranch Hand

Joined: May 16, 2000
Posts: 73
Hi all - hope someone can help.
I Have a few JDialog boxes in my app & I cant set the icon on the Title Bar of the JDialog. I tried using this.setImageIcon(Image myImage) however I could not create an Image from the gif that I want to use.
Martin webster

Joined: Jun 20, 2001
Posts: 20
If you want to display a gif, then the easiest approach to take is to create an ImageIcon, whose constructor takes the name of the image....
dlg.setImageIcon(new ImageIcon("image1.gif"));

It is sorta covered in the JavaRanch Style Guide.
subject: HELP - JDialogs!
Similar Threads
Need some help asap..
Icon image is not shown properly in LInux
MY Logo on JDailog
Modal Frames
setting the frame icon to JDialog windows