Changing FileChooser directory.

Hello!
Does anybody have an idea how to change a directory
which FileChooser show by default . (home directory in my case). And i want it to show me a directory where my java files are.
Thank you !

hi..
JFileChooser chooser = new JFileChooser("some dir.");
    int returnVal = chooser.showOpenDialog(parent);
    if(returnVal == JFileChooser.APPROVE_OPTION) {
       System.out.println("You chose to open this file: " +
            chooser.getSelectedFile().getName());
you could use getProperty(user.home); or something like that.. to get the current home dir of the user
Sander

Similar Messages

  • How do you change the directory location from the hieachy window.

    Our DAQ system consists of 285 vi's. During development changes, some vi's were created and passed to the DAQ via a LAN connection. Pulling up the vi's at the DAQ has changed the desired path such that some come from the LAN virtual drive, while others are resident on the DAQ PC. All have been copied to the PC's hard drive. Viewing the LabView hiearchy, how do I change the directory for a few individual vi's to point at only the PC harddrive? I saw this done once, but forgot how and cannot easy find it in the help files.

    When this happens to me I temporarily disconnect the network drive or rename the network folder to force LabVIEW to do a search. If they're all in the same folder as the main VI, they'll be found automatically.

  • How do you change the directory of system exec after it has ran once in the current vi

    Hi all,
    Attached is the sub vi that i am running in my main application.  I run it twice and change the directory of the file to run.  It appears that after i run this vi that i cant change the directory and it tries to run a file from the incorrect directory.  Does anyone have any advice on how to fix this issue?
    Attachments:
    system execute command.vi ‏41 KB

    matt198717 wrote:
    Hi all,
    Attached is the sub vi that i am running in my main application.  I run it twice and change the directory of the file to run.  It appears that after i run this vi that i cant change the directory and it tries to run a file from the incorrect directory.  Does anyone have any advice on how to fix this issue?
    I am not sure, if I understand exactly the problem, but do you really need the cmd /c start some_executable.exe. This executes a command prompt window, which executes another command prompt window, where your executable runs.
    You can just use cmd /c some_executable.exe some_parameters_if_needed, and you don't need any quotation marks, even if the executable has command line parameters. I you want that the executable runs in particular directory, wire this path to the 'working directory' of System Exec.vi

  • Wireless Toolkit J2ME - changing the directory structure for your projects

    When I create a new package in the Sun Java Wireless Toolkit, the toolkit is creating a folder for the application and its subfolders in the following directory:
    C:Documents and settings/Owner/j2mewtk/2.5.2/apps/<name_of_project>....
    I am trying to change the directory for new and existing projects so that the directory is:
    C:WTK2.5.2/apps/<name_of_project>....
    The WTK is already installed directly under the C drive (C:WTK2.5.2/ )
    Any help would be much appreciated.

    I experience the similar problem.
    But got success with some mobile models and most of them fail.
    I put the following file in the web page.
    (test.html, test.jad, test.jar)
    Sony Erisson P800, install successful when accessing http://x.x.x.x/test.html, or http://x.x.x.x/test.jar
    Nokia 7650, install successful when accessing http://x.x.x.x/test.jar
    Nokia 3530 Fail,
    Does anyone know how to install java game to Nokia 3530 through Web.

  • How to change read-directory when using file adapter

    Hi, I'm deploying BPEL process to read files from a directory. I want to change the directory where to read dynamically. This can be achieved by using a file header variable. I know how to do this. But, the problem for me is that I can not find a place to assign this file header variable a correct value. The first step in my BPEL process is the receive-step and this has to be the first step. I wanted to place the assign-step before this step but this makes the BPEL process invalid. First step has to be a receive or a pick-step. So, now I have a dilemma! Anyone an advice on this?
    Thanks in advance.

    Maybe you can use this information :
    http://otndnld.oracle.co.jp/document/products/as10g/1012/doc_v3/integrate.1012/B14448-01/html/app_trblshoot.htm
    A.3.3 Common User Errors explains something about the fileheader messages

  • Msg server implementation with change in directory tree strcucture

    Hello all,
    Our organization is using directory server 5.1 and messaging server5.2.Our company is going for a change of directory tree structure.Can anybody please tell me whether for this change of directory tree structure we will have to again go for a reinstall of our messaging servers.Is there a way by which present messaging servers can be made to operate with new directory server with revamped directory tree structure.We are not going to upgrade to a new version of either directory or messaging server.

    The "schema 1" that 6.0 supports is the two tree system.
    Schema 2 is single tree. You may be able to go that direction, BUT this road is not well documented. There's really no "schema guide" the way there is for 5.2 and "schema 1".
    You can certainly download and install 6.1, and provisioin some test users, and see what it does.
    The mailstore has had only minor changes gooing from 5.1 to 5.2 to 6.0 to 6.1, and the server should automatically and invisibly upgrade as you go.
    the queue is incompatible, so you will need to clear the queue before you upgrade.

  • When changing database directory in lk6.5, no alarms are logged anymore.

    When changing database directory in lk6.5, no alarms are logged anymore. Traces are running ok, only any query in MAX concerning alarms, will result in an empty response

    Hi Ryan,
    I tried many ways. First as you described. Second; delete all databases (with MAX) and start lookout, hoping lk would make al necessary settings.
    I tried short path name, long path name. All the same results; database will be made (or manually with Max or automatically by lk), all traces works, only NOT the Alarm logging. (database isn't corrupted, while a query done in MAX don't result in an error, just empty result).
    I the meantime I found something;
    C:\Documents and Settings\my name\my documents\Databse --> traces works, alarms not
    C:\Program Files\National Instruments\Lookout 6.5\Database --> all works
    So it seams that specificly "my documents" does'nt work for alarms, just for traces (????)
    I also found the following message when trying to export the alarms; "The given Citadel database is not currently configured to log alarms to a relational database." Does this ring a bell?

  • How can i change the directory permissions?

    my xampp htdocs directory does not include me as a user but has Nobody? how can i change the directory permissions because i cannot edit a file?
    Thank you

    Select the directory, CMD+I, go to the bottom, unlock the lock, and add yourself to the list with R&W permissions.

  • How do I change the directory where Firefox stores temporary internet files?

    I want to change the directory location where temporary internet files are stored. I am running version 3.5.

    See this KB article: <br />
    http://kb.mozillazine.org/Browser.cache.disk.parent_directory

  • Changing home directory name

    Hello,
    I have a macbook OS X version 10.7.5
    I bought this computer years ago used and am yet to figure out how to change the directory name.
    Help would be greatly appreciated.
    Thanks!

    Open the Users & Groups pane of System Preferences, unlock it, control-click your account, choose Advanced Options, and change it.
    (102663)

  • Javax.swing.JFileChooser -- open button change current directory... Why?

    Hello community.
    I use javax.swing.JFileChooser class. After press open button, JFileChooser change current directory. Why?
    I was not find in documentation about changing curret directiry by JFileChooser. Take me please reference to doc for understanding this effect.
    Thank you.

    This is my code:
    private void jFileChooser1ActionPerformed(java.awt.event.ActionEvent evt) {                                             
    // TODO add your handling code here:
    // label1.setText("3: "+evt.);
    // label1.setText("3: ");
    label1.setText(evt.getActionCommand());
    System.out.println(evt.getActionCommand());
    if (evt.getActionCommand().startsWith("Approve")){
    label1.setText("You push Open key");
    System.out.println(jFileChooser1.getCurrentDirectory().getPath());
    label1.setText(jFileChooser1.getCurrentDirectory().getPath());
    }else{
    label1.setText("You push Close key");
    I not add method for change current directory. But after press on open button javax.swing.JFileChooser class was change current directory.

  • Changing saplog directory with maxdb

    Hi,
    I have installed 04s portal server with maxdb in my desktop. I specified, all directories to point to D: during installation. However, saplog directory alone got created in C drive.
    It is occupying so much space, that am effectively not able to use my server.
         I have specified overwrite mode for log area.
    How do i change the saplog directory to point to D drive. Or will deleting the DISKL001 file cause any issues using my portal server. If i manually create a similar structure in my d drive and copy the DISKL001 file, where should i change to reflect the new location of saplog directory?
    Thanks
    Best Regards
    Sumathi

    Hi,
       In Log Settings of Configuration tab, there is no option to change the directory where DISK001 is stored. All i can see is three radio options to set Log Mode, Overwrite mode and Activate or Deactivate the Redo Log Management.
       Version of Maxdb manager is 7.6
       Any other option to change the directory
    Thanks
    Best Regards
    Sumathi

  • Can't change cache directory anymore?

    Hey I reinstalled spotify and I can't seem to find the option in the settings where you could change the directory of the buffer files anymore? Can you not change this anymore? Will this come back in an future update?Otherwise I won't be able to use spotify any longer and have to look for a better solution. 

    I expect they correct this HUGE mistake.  What about who have a SSD? Are you gona to pay a new SSD? If you don't solve this mistake i remove my premium.

  • HT201361 Can I change the directory where screen capture saves the png files?

    hi:
    screen capture questions:
    1) Can I change the directory/place where the macbook (maverick osx) screen capture it putting the png/images?
    Currently it is going to my desktop and I would like it in another spot.
    2) Can I change the default name to include a number e.g so each screen capture increments by 1 rather than telling sequence by time?
    thankyou

    If you use the Grab.app in Applications/Utilities, you can name the file whatever you want and place it whereever you want. Filenames are not automatically incremented, however.
    The disadvantage is that it saves the capture only in .tiff format, not .png
    But double-clicking on the saved .tiff file will open it in Preview.app, and you can then Option+Save As in .png format in that same folder, or elsewhere.
    Grab.app has some other nice features too, such as selecting a cursor shape to be displayed (or none), and doing a timed screen capture.
    And of course there are other apps...
    http://mac.appstorm.net/roundups/graphics-roundups/7-awesome-screen-capture-apps -made-for-the-mac/

  • How can I change the directory in which I install oracle-xe-universal?

    Because I need to install it into my ssd which is mounted in the other directory.
    I know I can install the rpm package by relocate the root, but it won't work.
    Where I can just change the directory where to install the oracle-xe?
    Thanks a lot.
    Best rgds,
    Robin

    Kay,
    If you are looking at the entire music library ("Music") you can sort by any of the columns by clicking the column header.  If there is a column you can't see, enable it by going to View > View Options.
    Within a playlist, you can do the same, and in addition you can click above the column of sequence numbers, which will then allow you to drag tracks up or down to get any order you wish.

Maybe you are looking for

  • Windows Server 2008 R2: "The update is not applicable to your computer"

    ALCON, I'm trying to install a "Windows Update Standalone Installer" file (Windows6.1-KB3032323-x64.msu) along with other .msu files and I keep getting the same message: "The update is not applicable to your computer".  The server is a virtual machin

  • Help Please! I appreciate any repli

    Hello Guys, A little while ago, I'd say around June maybe, maybe earlier... Probably earlier. Sorry I can't give a specific date or anything, BUT thats not the problem. I have a Nomad Jukebox Zen Xtra from Creative and it's worked very well. I loved

  • Mountain Lion killed my Office 2008 suite!

    Mountain Lion disabled my Office 2008 applications. I've tried installing the Office 2011 suite (don't have a key number for the 2008 version, so downloaded a 30-day trial version of 2011, it's also having stumbling/locking up). Should I simply unins

  • Question about syncing

    If I have a classic iPod that was originally sync worth a Mac and decide to sync it with an HP instead will I lose my stuff?

  • Could not get back to guess OS win 7

    I think I did a mistake here in stalling my guest OS Windows 8 Server - since I could not get back to my host operation system Windows 7 in my laptop. Obviously, I did install windows 8 server in my laptop in VMworkstation 9 as I had done in the past