aspose file tools*
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane.showInternalXxxDialog and window icon" Watch "JOptionPane.showInternalXxxDialog and window icon" New topic
Author

JOptionPane.showInternalXxxDialog and window icon

Christian Kindler
Greenhorn

Joined: Apr 16, 2009
Posts: 18
Hello,

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?

Regards,
Christian
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

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
Greenhorn

Joined: Apr 16, 2009
Posts: 18
Yes, I did.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JOptionPane.showInternalXxxDialog and window icon