Solved

JFileChooser Mac and Windows compatibility (also on file separators)

Posted on 2003-11-19
3
510 Views
Last Modified: 2011-09-20
Hi. I am currently making an applet that uses a JFileChooser. It's supposed to work on both Mac and Windows OS. I just would like to know if JFileChooser is compatible with both operating systems (like, it automatically takes care of the file name format differences and such). I dont really know anything about Mac OS though.

One more question, In the file chooser, the user may be allowed to choose more then one file. I would like to know what is the standard file name separator for Windows and for Mac if any or what would you recommend?

Thank you very much in advance. I need all the help I can get =)
0
Comment
Question by:animor
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 20 total points
ID: 9779919
JFileChooser should work on any Java platform.

Use File.separator in your filenames.
0
 

Author Comment

by:animor
ID: 9780508
Thanks for the tip. I checked the File API and realized that what I needed was the pathSeparator variable. Thanks again.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9780596
Ah.  Yes sorry ;-)

and thanx ;-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 81
how do i compare an object based on two fields 6 49
Apps blocked by Java 9 64
javap not working 8 39
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now