how to create own file with icon that inherit from JFrame icon, that I set it, in java and my own file use FileOutputStream and ObjectOutputStream

前端 未结 2 1059
忘了有多久
忘了有多久 2020-12-02 02:42

I want to create my own file with icon that inherit from JFrame icon, that I set it, in java and my own file use FileOutputStream and ObjectOutputStream



        
2条回答
  •  一向
    一向 (楼主)
    2020-12-02 03:16

    The Operating System chooses what icon a file is displayed with. It is your job to write data to the file and give it a file extension (in this case that's 'ckl') but it is up to the OS that the file ends up on as to what icon it is given.

    It is possible to embed icons in some files (many executables often have their own icon) but ultimately it's still up to the OS.

提交回复
热议问题