Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

How to change the top left program icon in swing

Hello there,
I have a problem identifying the top left program icon in swing, that's the one that's on the program tool bar... there must be a way to override the default CoffeeCup icon somehow does anybody know?

Thanks,
Mentar
0
mentar
Asked:
mentar
  • 2
1 Solution
 
mentarAuthor Commented:
sorry I meant the title bar not the tool bar
0
 
odog1999Commented:
When you create a new JFrame, you can pass it as a parametera a GraphicsConfiguration component, which will show up in the top left corner of the screen.  If it is null, the default icon will be used.

hth,
Odog
0
 
yongsingCommented:
You can change the icon as follows:

ImageIcon icon = new ImageIcon("system.gif");
frame.setIconImage(icon.getImage());
0
 
mentarAuthor Commented:
Thanks... just tried it works perfectly :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now