Want to output only the directory path in the jTextField

Currently, I am getting the directory path, but need to select a file inside it, then only the directory path gets selected in the jTextField1. Please tell me how do I get the directory path in jTextField1 by selecting only the directories in jButton1.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
     JFileChooser dirchoose=new JFileChooser();
     dirchoose.setCurrentDirectory(curfile);
     String directory=dirchoose.getCurrentDirectory().toString();
     int stat=dirchoose.showOpenDialog(this);
     if(stat==JFileChooser.APPROVE_OPTION)
          curfile=dirchoose.getCurrentDirectory();
          jTextField1.setText(dirchoose.getCurrentDirectory().toString());
          String jTextField1Text=jTextField1.getText();
File curfile=new File("C:\\");

Please ignore this topic. I am new here and was bit confused with the forum.

Similar Messages

  • Backed up Lightroom 2 to a 'backup plus'.  Will be installing Lightroom 5 to a new Win 7 computer and want to move only the photos to a dedicated 1 tb drive in the machine.  Anyone know Where my actual photos are stored on 'backup plus'?  Thank you

    Backed up Lightroom 2 to a Seagate 'backup plus'.  Will be installing Lightroom 5 to a new Win 7 computer and want to move only the photos to a dedicated 1 tb drive in the machine.  Anyone know where my actual photos are stored on 'backup plus'? Thank you

    Thank you for your reply.  I have been backing up my entire computer and when I follow anything having to do with Lightroom I am not finding actual photos.  I hope to find the photos that have been backed up along with updates to them that my wife has been performing during her edits.  Found Lightroom 2 catalog Previews/Lrdata.  Could that be it?

  • Can't set directory path in a JTextField

    I've tried to set some directory paths in a JTextField, but nothing displayed in that the JTextField. However, i can print the directory paths one at a time to the console. The following is the code and will explain what I am trying to do:
    fileDialog.showOpenDialog(this);
    File[] classpath = fileDialog.getSelectedFiles();
    if(classpath.length == 0)
    return;
    String cp = "";
    for(int i = 0; i<classpath.length; i++){
    //System.out.println(classpath.getPath());
    cp.concat(classpath[i].getAbsolutePath());
    System.out.println(cp);
    jTextField_cp.setText(cp);
    if I uncomment the first print statement,each path will be shown on a new line in the console. But when I want to print the pathes of the directories in one time( concatenate them first), there's no output at all (the second print statement), I only got some empty new lines in the console. Is it any problems with the use of "cp.concat()" method?

    I'm pretty sure that it'll work if you replace your concat line with this.
    cp = cp.concat(classpath.getAbsolutePath());Java strings are passed by the value of their references, so you are only manipulating the value of the reference, the the string itself, unlike other objects. To work around that, assign cp the new string returned from the concat method.

  • Apple tv 3 and the New iPad - I WANT to stream only the sound

    Hey guys!
    I've got the new iPad and apple tv 3 which is great together!
    I have a receiver (which is located in the living room)  with Zone2 option and also have outdoor speakers which are connected to that Zone2.
    When I sit outside i want to use my great speaker system and use the outdoor speakers using AirPlay and ATV and stream the content to my ATV but the thing is that when i do that I lose my video on the device and the tv (which is in the living room) shows my video feed.
    That of course is a problem coz I enjoy my great speakers but can't watch the video (like YouTube video or something else)...
    Is there a way to stream the sound only to the ATV?
    I found discussions of people who don't manage to stream their video to the ATV and only managed to stream their sound but that was an error and things like firmware update solved their problem...
    Found no discussions of people who TRY to stream only the sound, like I want to...
    Does anyone have an idea that can solve my problem?
    Thanks a lot in advance!!!
    Golan

    It's actually very easy and doesn't even require splitting the video stream and extracting the audio track from it (which is pretty easy if you have a desktop computer).
    If you don't want to play back protected content (non-music videos purchased from iTunes Store), all you need to do is getting GoodPlayer, letting it play audio in background (Settings > Background Audio) and connect to your ATV in non-AirPlay mirroring mode. It'll happily play back the audio track of the video while you can do anything in the foreground. (Note that, in addition to GoodPlayer, other background audio-playback players may also work - it's just that I've tested GoodPlayer in this regard between my ATV3 and iPad 3. Let me know if you need more - for example, a list - info on them.)

  • Power Mac G5 Audio is outputting only the right channel

    I have an audio problem with my PowerPc Audio card, I presume. It is only outputting the right channel. I have a set of computer speakers and when I go into System Preferences and move the balance slider, there is only sound coming from the right channel. Absolutely nothing from the left.
    I found this problem when editing in FCP and needing to do a split track with VO on channel 1 and Nats and music on channel 2. I could see the meters showing the audio output from channel 1 but no sound coming through the Mac's left channel output.
    Also, I have a DeckLink extreme card in my system and when I test the L-R channel output I get the same problem. I do not know if the decklink is somehow using the Mac audio card for help with its output. I would think that it is using its own hardware for generating the audio output from the card.
    Hardware issue? Time for a Mac Genius repair? Don't know if there is any workarounds or fixes before I go that route. Any help would be appreciated.
    Thanks
    Doug

    No I didn't but I run my Mac's output into an analog mixer and then out to my speakers.
    When outputting through channel 2 only, both speakers work, yet when I pan to channel 1 the sound drops out. As I pan from full channel 2, where both speakers are up full, you can hear the sound fade out.
    Also, I got the Deck Link card to work through my mixer. The L and R channels are outputting through separate inputs in the mixer and work independently and correctly. I even changed out the mini stereo cable just in case and still no left channel out of the Mac.
    Very weird! I've even repaired and defragged my system disk in case it is some sort of corrupted code. Just grasping at straws before I take it to a Mac Genius.
    Thanks for writing. I appreciate any and all suggestions.
    Doug

  • I want to copy only the email address from Mail, not the name and email

    When I get an email I want to be able to copy ONLY the email address and NOT the name.
    Before I would click on an email, click on the email address and paste the email address to a list.
    Now I do that and I get the name AND the email address, which makes me edit out the name every time. UGH.
    Mavericks 10.9.5

    did not make a difference. If I copy from the email (that has a name & email) and paste to text file (Bbedit) the name and email still show. I do not want the name, just the email.

  • Output only the Interactive Reporting document in an IR job/output?

    Hello,
    I have created an Interactive Reporting job using the File->Import->File as Job. I have walked through the various screens to supply oce connection information, output directory etc. The output however, shows up as a Table of Contents - 1) Interactive Reporting Document 2) Interactive Reporting Document (Web Client) 3) A HTML file that contains log information.
    Is there a way to specify that only yhe Interactive Reporting Document be generated and placed in a target directory of choice?
    I don't want to produce an output everyday and have my users open up the Table of Content and have them pick the document. I just want the document output standalone.
    Thanks in advance.

    Wasn't there an Acrobat issue that affected this as well? Make sure that is updated, too.
    While I'm on it, this is being viewed in Acrobat/Reader, right? Anything else, especially Mac Preview is a bit of crapshoot.

  • I want to print only the last message in a thread of messages

    I have to keep hard copies of e mails.
    The problem is that as a trhead gets added to it means the print outs get longer and longer and are of course repatative
    Is there a setting that allows me to only print the most recent mail in a thread?

    Have you tried to open the last message in a new window?
    If that includes the messages you do not want to print, you could limit the printing to e.g. the first page (in the print dialog).
    For more advanced options you could look at the [https://addons.mozilla.org/nl/thunderbird/addon/printingtools/ PrintingTools add-on].

  • Travelling to Europe, want to use only the web and not the phone

    I will be travelling to Europe and would like to use my iphone to check my e-mail, etc., but do not want to use the phone part and pay roaming plus $2/minute, how do i turn the phone off?

    Check with AT&T and see what the rates will be. You may find it cheaper to check e-mail at an Internet Cafe or at the hotel. One of the changes with 1.1.1 is the ability to turn off data roaming when overseas. If you neither make nor receive calls, you'll not be charged for overseas roaming. But if the data function remains on and certain features like automatic e-mail checking are enabled, then you'll get the data roaming charges.
    Personally, I've never taken the SIM out of the iPhone, but I would imagine that it would be necessary for data functions just like it is for phone calls. If someone knows first hand to the contrary, then I'll stand corrected.

  • Get only the filename not the full path of the file.

    hi to all..
    how can i get only the filename of the file not the full path and to be placed on a textinput.?
    example:
    when i'browse the file and select sample.txt
    "C:\Users\user\Desktop\folders\sample.txt" this will be inputted on the textinput.
    however, what i want to have is when i'browse and select a file..
    textinput should only contain "sample".
    does anyone knows how to do it?

    Hi cyrus@adobe,
    How are you getting the full path of the file when you browse, I dont think for security reasons the Flash Player will aloow to do so. You can only get the file name not the full path of the file when you browse.
    Are you using Flex4..?? I am not sure whether this is possible in Flex4..However if you are getting full path and if you wanted to show only the filename then you can just use theString class split function to acehive this..
    var fullPath:String = "C:\Users\user\Desktop\folders\sample.txt";
        var splitPath:Array = fullPath.split("\");
        textInput.text = splitPath[splitPath.length-1];
    Thanks,
    Bhasker

  • How Do I Make An Alternative Template Directory Path?

    We want to set up a directory path that would allow everybody in the office to share the templates that have been made. The Managers share the Templates, thus I need the Template directory to exist in a common Place. Is there a way to set a share template folder?

    You certainly can put a folder full of templates on a server that everyone can access, but what will happen is that when they open and resave them as templates they will be saved to the personal template location.
    Where that is on your Mac, depends on what version you are talking about, which you haven't mentioned.
    There are other ways to do this.
    One way would be to create a folder/s of Pages files that you will use as templates on your server and add an alias pointing to the folder/s in the Sidebar of all your employee's Macs. To secure the originals you can make the files Locked/Stationery pad or the folder Read Only. You won't get the Template Chooser but you could set the folder up to Icon View and make that as large as you like.
    I am sure if you sit down and think about it there will be multiple ways you can manage the process.
    If you have a server Admin they should be able to work this out for themselves.
    Peter

  • How to restrict material output in the report published in the portal

    Hi all,
    I am new to BI 7.  I have a series of materials that start with the material IDs TR52, RL25, XY56 and son on.  Now my user wants to view only the materials that are starting with the ID TR52 when he runs the report from the portal. In the material box when I type in TR I am getting the list of all the materials, the same is happening even when I try TR*.  What should I do so that I can restrict the report output only to a particular material ID that my user types in?
    Please help. 
    Thank you.
    TR.

    Hi Friends,
    Thank you for the reply.
    I tried to exclude the values, but i dont find any chance to exclude them
    If i try the same from characteristic restriction, its allowing me to exclude.
    Is there any other possibility to restrict these? Please suggest

  • Can we display only the required columns dynamically?

    Hi All,
    I have a scenario where in I have 30 columns in the rtf template. All the columns will never be displayed, only a select few will be available for display. So the output file is show blank columns. Now I want to display only the columns which contain data.
    FYI- We cannot know which columns consist data until we run the report.
    Any Advice.
    Thanks in advance.
    Madhav.

    Hi,
    You can use the following:
    Column header:
    <?if@column:/node/child_node="PUBLIC"?>My label<?end if?>
    Column data:
    <?if:/node/child_node="PUBLIC"?>My data<?end if?>
    The @column will tell XMLP wheater or not the column shall be shown.
    I hope this helps you.
    BR Kenneth

  • How to print the output of the screen in Dialog Programming

    Hi,
    Could anybody help how to print the output of a screen in the dialog programming. i can select 'Hard Copy' option in the 'Custumizing of Local Layout' Icon in the standard tool bar. but that prints the whole screen with the toolbar. i want to print only the output which is displayed on the screen. Please help..
    Regards,
    Swathi

    Hi Swathi,
        Ok. Do One thing. Go to menu bar and select Systems -> Own pool Request -> here you get the spool number. Select it and select the option "Print Directly" in tool bar.
    Thanks.

  • Content.load("directory path");

    Hi..I have a flash file using a textarea component that
    brings in XML data. I'm running into an issue that involves my XML
    and CSS file residing on a different server. The ".load" command
    seems to only read a directory path. I think I need a command that
    will read a URL based ("http") path. Any ideas? Below is my code
    for reference.
    //init TextArea component
    myText.html = true;
    myText.wordWrap = true;
    myText.multiline = true;
    myText.label.condenseWhite=true;
    //load css
    gpsdsStyle = new TextField.StyleSheet();
    gpsdsStyle.load("GPSDSNET/XML/gpsdsUpdate.css"); //need to
    insert http path here
    myText.styleSheet = gpsdsStyle;
    //load in XML
    gpsdsContent = new XML();
    gpsdsContent.ignoreWhite = true;
    gpsdsContent.load("GPSDSNET/XML/gpsdsUpdate.xml"); //need to
    insert http path here
    gpsdsContent.onLoad = function(success)
    if(success)
    myText.text = gpsdsContent;

    quote:
    You can't load it just like that ?
    gpsdsStyle.load("
    http://yourdomain.com/gpsdsUpdate.css");
    I initially thought I could just load it like that. After a
    lot of troubleshooting, someone told me that it will only read
    directory paths, and not URL.

Maybe you are looking for

  • UpDated Flash Player last week doesn't work previous ver worked fine

    I updated last week when it prompted me to, now websites that i used to use will not work. it just gives me a blank area where the flash animation should be. I have figured out that it has something to do with my firewall. When i disable the firewall

  • Not able to type body/subject in the mail ?

    Brand new iphone bought for Christmas. I start at Home where the mail app is at the bottom, I can write in the email address I want to send, but when I go to the body the key pad isn't showing up. (I'm using Yahoo email) Is it because I don't have a

  • Frequent close down of Ipad

    When using my Ipad i often get it closing down on me and displaying the Apple logo on the screen. It returns to funtion only when i switch the Ipad on again with the on switch. Could someone please inform me how i might get over this problem.

  • Mac Book Pro with an Intel duo core processor & Lion?

    Would I be able to update to Lion. There are no additional designators in system profiler (like I-13 etc) for this processor, other than Core 2 Duo. Will this be configuration be upgradable to Lion? Thanks

  • CS4 Spry File is Corrupt

    Okay I did the unthinkable and revised (eg: deleted some code from) a css spry asset. Ever since, CS4 has stopped working. After trying various restore points, I can finally open CS4, but every time I try to open the spry asset file to fix what I mes