File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JDialog icon 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 icon" Watch "JDialog icon" New topic

JDialog icon

Vinod Venugopal
Ranch Hand

Joined: Dec 06, 2000
Posts: 148
How do I put an icon on the top left hand corner of a JDialog , as we can do so in a JFrame? I know we can do it thru JOptionPane but my JDialog has some buttons which I don't want to remove, so I can't think from that point of view. Any suggestions?

- Vinod<br />-------<br />SCJP2
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
You have to set the parent frame icon and JDialog uses it.
Don't get me started about those stupid light bulbs.
subject: JDialog icon
It's not a secret anymore!