This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem in this code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem in this code" Watch "problem in this code" New topic

problem in this code

Rishabh Rathi

Joined: Mar 07, 2011
Posts: 13
I want to browse for folder and want the browsed path in the textbox....


here chooser.getSelectedFile() is giving me the path of browser and know i want that path to be in field1( i.e text box) .how i can perform the above task so as to get the desired output
Darryl Burke

Joined: May 03, 2008
Posts: 5091

What's a textbox? Does its setText method accept a File? (not likely)

luck, db
There are no new questions, but there may be new answers.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10768

Check out the File API for methods which will give you the path of a given file

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: problem in this code
It's not a secret anymore!