Setting file icon in java
Executable files (.exe files on Windows) are the only files I know of that have individual "custom" icons. All other files have the same icon according to their file extension. For example, html files may have the Internet Explorer or Mozilla Firefox logo, depending on the application that opens them by default. PDF files usually have the Adobe logo. As indicated by "ulmangt", you can specify your own icons for files with specific file extensions by configuring the default program used to open them. Good luck!
source to share