setIcon

fun setIcon(icon: String)

set the icon of this window according to the given icon path. This should be a resource path that can be used by getResourceStream.

Does not work on macOS. This is a limitation of GLFW, and is not a bug in PolyUI.

The icon should be a PNG, BMP or JPG, and in a 2x size (i.e. 16x16, 32x32, 128x128, etc)

Throws

if the image does not exist, or a different IO error occurs.

SIGSEGV - if something else goes wrong in this method. Your JVM will crash blaming [libglfw.so+0x211xx] or something.