List of usage examples for java.awt Frame setIconImages
public synchronized void setIconImages(java.util.List<? extends Image> icons)
From source file:processing.app.Base.java
/** * Give this Frame an icon.//from w w w .ja v a2s . c om */ static public void setIcon(Frame frame) { if (OSUtils.isMacOS()) { return; } List<Image> icons = Stream.of("16", "24", "32", "48", "64", "72", "96", "128", "256") .map(res -> "/lib/icons/" + res + "x" + res + "/apps/arduino.png") .map(path -> BaseNoGui.getContentFile(path).getAbsolutePath()) .map(absPath -> Toolkit.getDefaultToolkit().createImage(absPath)).collect(Collectors.toList()); frame.setIconImages(icons); }