Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes JOptionPane.showInternalXxxDialog and window icon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane.showInternalXxxDialog and window icon" Watch "JOptionPane.showInternalXxxDialog and window icon" New topic

JOptionPane.showInternalXxxDialog and window icon

Christian Kindler

Joined: Apr 16, 2009
Posts: 18

working with JDesktopPane/JInternalFrame, I want to show a simple information message in a modal(!) dialog. According to the docs, this should be done with JOptionPane.showInternalMessageDialog(). This works fine, but as the window icon (the icon for window decoration in the upper left corner of the dialog) the typical Java coffee cup is displayed instead of my frame icon.
I could implement the message dialog as a JInternalFrame and customize the icon, but this dialog wouldn't be modal. So is there any smart possibility to have the frame icon (or a icon of my choice) as the JOptionPane message dialogs window icon?

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10768

Have you set the dialog's parent as your current frame?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Christian Kindler

Joined: Apr 16, 2009
Posts: 18
Yes, I did.
I agree. Here's the link:
subject: JOptionPane.showInternalXxxDialog and window icon
It's not a secret anymore!