LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2006, 05:52 AM   #1
MRMadhav
Member
 
Registered: Nov 2005
Location: Mauritius
Distribution: PCQLinux, SUSE Linux,Fedora Core 5, Fedora Core 6, Knoppix Live, Kubuntu Edgy, PCLinuxOS
Posts: 167

Rep: Reputation: 30
JFileChooser equivalent for Directories


Hi, I wanted to know if there was an equivalent for the JFileChooser in java that allows the selection of Directories only. I have not been able to find anything of that type on the internet anywhere!
 
Old 11-29-2006, 06:23 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Quote:
Originally Posted by MRMadhav
Hi, I wanted to know if there was an equivalent for the JFileChooser in java that allows the selection of Directories only. I have not been able to find anything of that type on the internet anywhere!
I think you can do that with JFileChooser. All you have to do is to enable DIRECTORIES_ONLY. Here is an example of how to use JFileChooser:

http://java.sun.com/docs/books/tutor...ooserDemo.java

Search for "DIRECTORIES_ONLY" and uncomment the line.

Regards!
 
Old 12-15-2006, 09:43 AM   #3
MRMadhav
Member
 
Registered: Nov 2005
Location: Mauritius
Distribution: PCQLinux, SUSE Linux,Fedora Core 5, Fedora Core 6, Knoppix Live, Kubuntu Edgy, PCLinuxOS
Posts: 167

Original Poster
Rep: Reputation: 30
Hi, Thanks for the response. It worked...
Am sorry for replying this late but I had too much to do to be able to reply before.
 
Old 12-15-2006, 10:11 AM   #4
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
No need to be sorry mate. I know the feeling of being busy and not having time to test or reply at LQ.org. I have a lot of threads that I asked for help still in my TODO list ^_^;;

Either way, I'm glad it worked.

Regards!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving directories to new directories keysorsoze Linux - Newbie 2 03-31-2006 07:14 PM
[Java] JFileChooser : possible with linux? gletare Linux - Software 1 12-18-2005 07:47 PM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 03:22 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
equivalent to c? codename000 Programming 3 04-03-2003 11:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration