• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Display File Icon on mac OSx

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?
Men call me Jim. Women look past me to this tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!