How do you make a File() have a Icon?

I want to know how to make a file or directory which displays a set Icon on it.RonX
[97 byte] By [RonXa] at [2007-11-27 1:06:55]
# 1
So no one knows how to do it... You disappoint me!!!RonX
RonXa at 2007-7-11 23:42:07 > top of Java-index,Java Essentials,Java Programming...
# 2
So Judging by the lack of answers... I think it is safe to say that this can not be done.Sorry to wast your time. Next time I will ask a simpler question. lol.RonX
RonXa at 2007-7-11 23:42:07 > top of Java-index,Java Essentials,Java Programming...
# 3
Make the question more clear..Did u mean to change icon in menu ,menuitem,etc...dont make it too short like this....
Reona at 2007-7-11 23:42:07 > top of Java-index,Java Essentials,Java Programming...
# 4

Ok Got it...

So what i want to do is create a directory like this:

File folder = new File("/RonX");

folder.mkdir();

Then make a Image Icon and some how place the Image Icon over the native Folder Icon, so when you go and find the folder "/RonX" You will see your icon over the folder.

I just don't know how to get the Icon over the Folder/File/Directory.

RonX

RonXa at 2007-7-11 23:42:07 > top of Java-index,Java Essentials,Java Programming...
# 5
This has nothing to do with Java. This is a function of the operating system you are using and normally depends on the file extension being mapped to an icon.
sabre150a at 2007-7-11 23:42:07 > top of Java-index,Java Essentials,Java Programming...