aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to represent a directory like an application-specific file in Java Swing on Mac Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to represent a directory like an application-specific file in Java Swing on Mac " Watch "How to represent a directory like an application-specific file in Java Swing on Mac " New topic
Author

How to represent a directory like an application-specific file in Java Swing on Mac

Nike Smith
Greenhorn

Joined: Oct 05, 2007
Posts: 11
Hello All,

How to represent a directory like an application-specific file in Java Swing on Mac ?
The application creates files that are stored in directories. How to represent those directories like application-specific files with icon assigned to them, etc, etc?

Thank you.
Nike Smith
Greenhorn

Joined: Oct 05, 2007
Posts: 11
So I am able to archive the information. How to assign an application-specific icon to it?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> So I am able to archive the information. How to assign an application-specific icon to it?

by archive, do you mean a .jar file?

if so, some info here:

http://www.coderanch.com/t/513237/java/java/change-icon-jar-file
Nike Smith
Greenhorn

Joined: Oct 05, 2007
Posts: 11
Michael Dunn wrote:> So I am able to archive the information. How to assign an application-specific icon to it?

by archive, do you mean a .jar file?

if so, some info here:

http://www.coderanch.com/t/513237/java/java/change-icon-jar-file


Thanks, Michael

Yes, it is .jar file, not executable, it contains some xml files generated by the application

I don't understand this code:
------------------------------------------------------------------------
you can change the icon of the jar file by the below code:
view plaincopy to clipboardprint?

this.setIconImage(Toolkit.getDefaultToolkit().getImage("images\\mylogo.png"));


what i have done here is, I have saved the image 'mylogo.png' in a folder named 'images'. Then i am making it as the icon of the jar file.
To make the clients to see your icon, Made that image folder as hidden folder and send that hidden folder along with zip file in which you will place your jar application and lib files.
------------------------------------------------------------------------

what is this in an example?


Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
I've not tried that way, but I tend to agree with the comments that follow that post in the link
that it will only change the icon of the JFrame/taskBar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to represent a directory like an application-specific file in Java Swing on Mac
 
Similar Threads
determine if file or directory in a web application
Urgent, need some help..
Problems setting PATH environment variable
In Eclipse, how to add log4j.properties to classpath ?
Directory Chooser Dialog?