Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JOptionPane.showInternalXxxDialog and window icon

 
Christian Kindler
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you set the dialog's parent as your current frame?
 
Christian Kindler
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I did.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic