Skip to main content

Application icon for the ALT-TAB ?

3 replies [Last post]
cris_rufino
Offline
Joined: 2006-02-17

Hello,
How can I load a image for the main JFrame and another image for the ALT-TAB viewer (on changing between apps)?

[]'
Cris.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
santhosh@in.fio...
Offline
Joined: 2006-02-14

use:
JFrame.setIconImage(Image image);

skelvin
Offline
Joined: 2003-06-11

That does not really answer the question, does it?

A problem is, that the app switcher scales the icon to a larger size, which looks bad.

I think you cannot provide two different images in pure Java though.

pietschy
Offline
Joined: 2003-06-10

> A problem is, that the app switcher scales the icon
> to a larger size, which looks bad.
>
> I think you cannot provide two different images in
> pure Java though.

If you call JFrame.setIconImage(..) with an image size that looks fine in the app switcher it gets scaled down for use else where (such as the title bar and window list). This works for me on both Windows and linux but I haven't tried it on the mac.

Cheers
Andrew