Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to disable coffee cup icon and the menu that comes with it?

 
Mike Perry
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I disable the coffee cup icon and the menu that comes with it when I display standard JOptionPane dialogs?
 
Gursewak Singh
Ranch Hand
Posts: 79
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
insert code...
obj.setIconImage(Toolkit.getDefaultToolkit().getImage());

In getImage() you can pass the path of any icon if you want to change icon of coffee cup icon
 
Mike Perry
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for taking time and replying.

But I want to totally remove that icon. I mean display nothing. I saw a work around on the web to use

new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);

With this workaround, I do not see any icon, but when I right click in that area, I still see the drop-down menu.

Ideally for my application, I do not want to display any icon or any drop down menu.
 
Gursewak Singh
Ranch Hand
Posts: 79
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friend try it without argument........
if it does't work then just place [ ("")]....
hope it will work and fulfill your requirement.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic