The Artima Developer Community
Sponsored Link •

Java Answers Forum
AWT FileDialog to select directories

3 replies on 1 page. Most recent reply: Nov 23, 2004 8:10 AM by Ellie Lock

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
a a

Posts: 2
Nickname: black78
Registered: Nov, 2004

AWT FileDialog to select directories Posted: Nov 9, 2004 2:37 AM
Reply to this message Reply
Advertisement
Hello.
<br><br>
I need some help. I want to create an Java AWT FileDialog to select directories. This seems to be not so easy. I have to overwrite some methods, thats what I found in other threads. But nowhere was a description, what changes had to be made.
<br><br>
I would be very, very happy, if someone could help me with some code to handle this. I realy need to solve the problem.
<br><br>
greetings Black<br>
<b>Black.78@gmx.de</b>
<br><br>
PS: I don't want to use the JFileChooser and I don't want to let the user select a File and user the getDirectory() method. I wanna have a Dialog, where the user can select a folder.


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: AWT FileDialog to select directories Posted: Nov 13, 2004 9:47 AM
Reply to this message Reply
        FileDialog dialog = new FileDialog(new Frame(), "Select Directory", FileDialog.LOAD);
        dialog.show();
        String directory = dialog.getDirectory(); 
        System.out.println(directory);
 

a a

Posts: 2
Nickname: black78
Registered: Nov, 2004

Re: AWT FileDialog to select directories Posted: Nov 16, 2004 8:48 AM
Reply to this message Reply
Like I wrote: "I don't want to let the user select a File and user the getDirectory() method."

Ellie Lock

Posts: 1
Nickname: ellie
Registered: Nov, 2004

Re: AWT FileDialog to select directories Posted: Nov 23, 2004 8:10 AM
Reply to this message Reply
I'm sorry I can't help with this, but I would be interested to know if you found a solution as I am having the same problem.

Thanks in advance,
Ellie

Flat View: This topic has 3 replies on 1 page
Topic: Public Main Previous Topic   Next Topic Topic: Can I use AspectJ to recognizing loop condition

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use