| Author |
HELP!! Trying to read a file In the dir. I have changed to.
|
david mohr
Greenhorn
Joined: Jan 13, 2002
Posts: 12
|
|
I am currently able to read a file from the default dir. When I use the the File chooser I can read any file with the dir. it prompts me to. But, when I change directories I cannot read the files in a different dir. ??? I have created a class with a method that reads the file passed in as the arg. and returns its contents in a String. The class name is Filereaderclass and the method is called getinfo(String filename). This is the code. The stuff commented out is another problem I am having. But, I think that problem should be posted in the Swing section. I am fairly new at this so If you see a bunch of other problems please let me know. Thank you for all your help. David mohr [ April 02, 2002: Message edited by: Peter Tran ] [ April 02, 2002: Message edited by: Peter Tran ]
|
 |
Brent Worden
Ranch Hand
Joined: Nov 26, 2001
Posts: 50
|
|
Try changing: To: The getName() method on file does not contain the parent directory name.
|
Brent Worden
|
 |
david mohr
Greenhorn
Joined: Jan 13, 2002
Posts: 12
|
|
Thanks Brent. I really appreciate your help. I have spent several hours trying to figure it out. David Mohr
|
 |
 |
|
|
subject: HELP!! Trying to read a file In the dir. I have changed to.
|
|
|