Link to home
Start Free TrialLog in
Avatar of s_lavie
s_lavie

asked on

App icon

Hi,
How do I set a frame's icon, using a .gif file? for both JFrame and JDialog.

By setting an icon I mean like an app icon.
Avatar of Jim Cakalic
Jim Cakalic
Flag of United States of America image

Use Frame.setIconImage(Image):

    Frame frame = new Frame("Application");
    ImageIcon icon = new ImageIcon("my_frame_icon.gif");
    frame.setIconImage(icon.getImage());

Best regards,
Jim Cakalic
ASKER CERTIFIED SOLUTION
Avatar of Jim Cakalic
Jim Cakalic
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial