• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display File Icon on mac OSx  RSS feed

 
Patrick McClain
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an java applet that is intended to be run on various systems (windows, linux, mac, etc). In a table I am trying to properly display files and there corresponding icons (i.e on a windows system the icons should look like the windows icons, on a mac system the icons should look like the mac icons.


This is easy to do for windows systems - I call:
FileSystemView.getFileSystemView().getSystemIcon(new File("some file"));

to retrieve the icon based on the file type. However on the MACs this merely retrieves generic icons (FileSystemView implements WindowsFileSystemView but not MacFileSystemView);

I know this can be done, because the default UI JFileChooser on the MAC displays the icons properly.

Does anyone have any suggestions on displaying the system-dependent file icons in java on the mac?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!