Solved

JFileChooser Mac and Windows compatibility (also on file separators)

Posted on 2003-11-19
3
507 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

706 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

19 Experts available now in Live!

Get 1:1 Help Now