-1

I am trying to fix a problem with my application that has been bugging me for a while. The icon is extremely ugly. So I have been doing a lot of research on best practices, and have come to this solution after a lot of research:

public class myApp extends JFrame {
    List<Image> icons = new ArrayList<Image>();
    Toolkit toolkit = Toolkit.getDefaultToolkit();

    public myApp() {
        icons.add(toolkit.getImage("/images/16x16.png"));
        icons.add(toolkit.getImage("/images/32x32.png"));
        icons.add(toolkit.getImage("/images/64x64.png"));
        icons.add(toolkit.getImage("/images/128x128.png"));
        setIconImages(icons);
    }
}

I get the default coffee cup with this. Does anyone know why this isn't working? Search engines keep on autocorrecting setIconImages to setIconImage... not finding a lot.

Edit: Changing the sizes did not help.

Peter F
  • 435
  • 1
  • 8
  • 17

1 Answers1

0

It was about the file name. All a typo. Sorry! The above works.

Peter F
  • 435
  • 1
  • 8
  • 17