Results 1 to 4 of 4
  1. #1
    totalspelnerd is offline Member
    Join Date
    Mar 2012
    Location
    Sweden
    Posts
    88
    Rep Power
    0

    Default Set icon of file depending on whats in it, like png

    So I'm in the middle of creating a model program with voxels. I don't need any help with the program itself, but I want to be able to see how the model looks like when I'm in for example my documents (not inside the real program). I want it to show an image of the model, just like a png file shows its image. I've tried looking around, but I've only found threads about changing exe files icon.

    Image example:

    Set icon of file depending on whats in it, like png-pp_fileicon.png

    So, is this possible in Java or do I need to use c/c++ (with JNA) to make this possible?
    Or is it not possible at all?

    Thanks in advance!

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Set icon of file depending on whats in it, like png

    I think this has everything to do with your file manager and nothing to do with Java.
    Get in the habit of using standard Java naming conventions!

  3. #3
    totalspelnerd is offline Member
    Join Date
    Mar 2012
    Location
    Sweden
    Posts
    88
    Rep Power
    0

    Default Re: Set icon of file depending on whats in it, like png

    But is there a way to manipulate the file manager in a language to make this work then?

  4. #4
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Set icon of file depending on whats in it, like png

    Perhaps, but it'll be specific to your file manager. And to do it in Java, you'll likely need to use JNI. Might as well just write it all in C.
    Get in the habit of using standard Java naming conventions!

Similar Threads

  1. Replies: 2
    Last Post: 01-06-2012, 08:00 AM
  2. Replies: 0
    Last Post: 10-31-2011, 11:13 PM
  3. Icon on Jar file
    By justbeller in forum AWT / Swing
    Replies: 4
    Last Post: 03-18-2011, 08:04 PM
  4. How to set Icon on jar file
    By justbeller in forum AWT / Swing
    Replies: 6
    Last Post: 01-22-2011, 10:21 AM
  5. Read and Write depending on file contents
    By paulhenderson in forum Java Applets
    Replies: 3
    Last Post: 02-15-2010, 12:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •