JFileChooser doesn't show any file!!

Hi all,
I am developing an java application that uses JFileChooser to choose a directory. However, very strange, the JFileChooser opened does not show any file or directory in C: drive nor D: drive. How can that happen? Anyone knows?
JFileChooser fileChooser = new JFileChooser();
fileChooser.showOpenDialog(this);Above is my code. When I only execute above code, it is normal (can see those files in C: drive). But if i run above code with my application, it doesnot show any file in C: drive. Please help me!!

Try specifying the default location in addition to the component.
if(windows machine) result=createDialog("Choose Parent Directory","Select Folder","C:\\");
private static JFileChooser createDialog(String title,String ilabel,String directory) {
          JFileChooser result= null;
          // TODO Auto-generated method stub
        // Create a window and some components
        JPanel topPanel = new JPanel();
          JLabel label = new JLabel(ilabel);
        JFileChooser jFC = new JFileChooser(directory);
        // Set the window's layout
        label.setAlignmentX(Component.CENTER_ALIGNMENT);
        //set file dialog to use direcotries
        jFC.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        // Setup the text, list, and checkbox
        topPanel.add(label);
        topPanel.add(jFC);
        int returnVal = jFC.showOpenDialog(topPanel);
        if(returnVal == JFileChooser.APPROVE_OPTION) {
            result = jFC;
        } else {
             result=null;
        return result;
     }

Similar Messages

  • An ipod doesn't show any files at all.

    Hi!
    My brother recently won a HP 20GB ipod, he connect it to the PC, install the software for the ipod, and itunes from the apple download site, everything supposed to work, all of his files are transfered to the ipod but when he want to see his music the ipod won't show anything, there is no music.
    Maybe is the ipod but I connect it to my Mac and all my music was transfer without a problem and is show perfectly on the ipod.
    Can someone tell me what is he doing wrong?

    My year old 20GB ipod is having the same problems. ive been in discussions about this a lot recently, and it seems like itunes 6 is causing problems with some ipods. try uninstalling your itunes and ipod software and restart. install the software that came with your ipod on the cd.

  • I changed my username and now afp doesn't show any users. I have file sharing on. And also when I select "get more info" on the shared folders they don't have my username in there. it just has "applepc(me)" it my old username before changing it.

    I changed my username and now afp doesn't show any users. I have file sharing on. And also when I select "get more info" on the shared folders they don't have my username in there. it just has "applepc(me)" my old username before changing it showed the correct username? please any help would be great.

    Turn Time Machine OFF temporarily in its preference pane. Leave the window open.
    Navigate in the Finder to your backup disk, and then to the folder named "Backups.backupdb" at the top level of the volume. If you back up over a network, you'll first have to mount the disk image file containing your backups by double-clicking it. Descend into the folder until you see the snapshots, which are represented by folders with a name that begins with the date of the snapshot. Find the one you want to restore from. There's a link named "Latest" representing the most recent snapshot. Use that one, if possible. Otherwise, you'll have to remember the date of the snapshot you choose.
    Inside the snapshot folder is a folder hierarchy like the one on the source disk. Find one of the items you can't restore and select it. Open the Info dialog for the selected item. In the Sharing & Permissions section, you may see an entry in the access list that shows "Fetching…" in the Name column. If so, click the lock icon in the lower right corner of the dialog and authenticate. Then delete the "Fetching…" item from the icon list. Click the gear icon below the list and select Apply to enclosed items from the popup menu.
    Now you should be able either to copy the item in the Finder or to restore it in the time-travel view. If you use the time-travel view, be sure to select the snapshot you just modified. If successful, repeat the operation with the other items you were unable to restore. You can select multiple items in the Finder and open a single Info dialog for all of them by pressing the key combination option-command-I.
    When you're done, turn TM back ON and close its preference pane.

  • I just update my iPhone which was previously jailbreaked when i update it after downloading all the file it start to show the apple logo for a moment and it went and completely turned off i tried to connect through iTunes but it doesn't show any iPhone

    i just update my iPhone which was previously jailbreaked when i update it after downloading all the file it start to show the apple logo for a moment and it went and completely turned off i tried to connect through iTunes but it doesn't show any iPhone connected to itunes

    No support for jailbroken phones will be given in this forum or from Apple.
    Unauthorized modification of iOS has been a major source of instability, disruption of services, and…

  • BPEL Console doesn't show any instances created

    Hi,
    We are using file protocol to read the files from trading partner into B2B. File is successfully processes by B2B. I can see that in reports.
    Then I have defined a BPEL process to Dequeue the messages from B2B using AQ Adapter, transforms and places the files in the local file system.
    The BPEL process is simple flow with one receive , transform and invoke activity.
    I have configured AQ adapter using WSIF browser. I can see the deployed document definition in browser.
    I have the TP agreement deployed, BPEL process deployed, but I don't see the 850 file processed. BPEL Console doesn't show any instances created. How would I know where what went wrong?
    Please help.

    Try using java oracle.tip.adapter.b2b.data.IPDequeue to dequeue the message and see if you can dequeue
    Then you'l be able to pin point if the issue is with your BPEL or with B2B Queue's
    Kalyan

  • "Dependecies" tab doesn't show any information for a selected table version 4.0

    Hello,
    I work with SQL Developer 4.0.0.13. I can see 20 tables in the list. When I select one table, in the tabs on the right side I can see information for "columns" and "data" and "constraints" and "indexes"... but the tab "Dependencies" doesn't show any information about references between this table and other tables in the schema.
    Oracle database is v11.2
    Can you please tell me what do I need to do in order to see information on "Dependencies" tab for a table?
    Thank you,
    Milan

    Hi, here is my example of XML extension showing referencing tables:
    Save the following XML to a file.
    <items>
      <item type="editor" objectType="TABLE">
        <title><![CDATA[*Referencing Tables]]></title>
          <query>
            <sql><![CDATA[SELECT
      cfk.owner "OWNER",
      cfk.table_name "TABLE NAME",
      cols.column_name "COLUMN",
      cfk.constraint_name "CONSTRAINT NAME",
      cfk.delete_rule "DELETE RULE",
      'SQLDEV:LINK:' || cfk.owner || ':TABLE:' || cfk.table_name ||
      ':oracle.dbtools.raptor.controls.grid.DefaultDrillLink' "LINK"
    FROM
      sys.all_constraints cpk,
      sys.all_constraints cfk,
      sys.all_cons_columns cols
    WHERE
      cpk.owner = :OBJECT_OWNER AND
      cpk.table_name = :OBJECT_NAME AND
      SUBSTR(cpk.table_name, 1, 4) != 'BIN$' AND
      SUBSTR(cpk.table_name, 1, 3) != 'DR$' AND
      cpk.constraint_type in ('P', 'U') AND
      cfk.r_owner = cpk.owner AND
      cfk.r_constraint_name = cpk.constraint_name AND
      cfk.constraint_type = 'R' AND
      cols.owner = cfk.owner AND
      cols.constraint_name = cfk.constraint_name
    ORDER BY
      cfk.owner, cfk.table_name, cfk.constraint_name,
      cols.column_name]]>
          </sql>
        </query>
      </item>
    </items>
    In SQLDeveloper select Preferences -> Database -> User Defined Extensions and click <Add Row>.
    In the "Type" field enter "EDITOR" and in the "Location" field enter the path to the file with XML.
    After restarting SQLDeveloper You should see a new tab "*Referencing Tables" for tables.

  • Ultiboard part wizard doesn't show any copper layers during part creation

    Ultiboard part wizard doesn't show any copper layers during part creation. I have to check the box to activate Copper Top in the part editor, once the part is made in order to see what I've made. I suspect there is a connection between this issue and my prior issue with the inability of the Multisim database to link to parts that I have recently made in Ultiboard. This all just began happening this week (of 8-27-12) Design Suite version is 10.1 & OS is Windows 7.
    Thanks.

    Hi Todc,
    This is very strange. My suggestion is that you can try to delete the configuration file. To delete the configuration file, go to Options >> Global Preferences. Under the Paths tab, select the path to the configuration file all the way upto config\ as shown in screen shot. Close Ultiboard and navigate to this folder. Delete all the files and then try to open Ultiboard again. This should resolve the issue.
    Please let me know what happens.
    Regards,
    Tayyab R,
    National Instruments.
    Attachments:
    v10 Global Preferences.JPG ‏77 KB

  • IPS MC: It doesn´t show any signature.

    Hi.
    I had IPS MC 2.1.0 (Build 123) functioning fine. I installed the idsmdc2.1.0-win-CSCsc336961.tar file in order to solve the CSCsc33696 bug. Next, I installed an update signature for IPS version 5 (But I didn´t has any IPS sensor version 5, I just was checking), but the update didn´t work. Afther it, I noted that I have a big issue: When I try to modify any signature, in the Settings->IOS IPS, it shows:
    Object loading failed. Errors occurred while loading the Signatures. Not all signatures may have been loaded.
    It doesn´t show any signature.
    I erased all the sensors, including the IOS IPS. Then I import one of the IOS IPS and follow the instruction for the CSCsc33696 bug. I reimported the device, deployed configuration, disabled the IPS feature in the router and enabled the feature in order to load the signature configuration, but the issue persist. Then, I installed the newest signature update to IDS sensor version 4 (it includes IOS IPS update) and it installed without problems, but the problem in the sigature page perisist.
    I reinstalled the IPS MC, but the problem persist. I uninstalled the IDS MC, and installed again without save the database. It shows the application IDS MC and Security Monitor without configuration, like a new installation, but the issue persist!!!
    Someone had this problem? Someone know how can I solve it?
    Thanks.

    The Cisco IOS IPS feature restructures the existing Cisco IOS Intrusion Detection System (IDS), allowing customers to choose to load the default, built-in signatures or to load a Signature Definition File (SDF) called attack-drop.sdf onto the router. The attack-drop.sdf file contains 118 high-fidelity Intrusion Prevention System (IPS) signatures, providing customers with the latest available detection of security threats. For more information refer to following url:
    http://www.cisco.com/en/US/products/ps5854/prod_configuration_guide09186a00802c9587.html

  • Finder doesn't show any windows

    Hi,
    Recently I got a strange problem, sometime Finder doesn't show any window, I mean if I click on the Finder icon on the Dock no window is shown. Even if I kill Finder (via Terminal using "killall Finder"), also using ⌘+TAB or the App exposuré gesture there is no way to see the Finder window. The only fix is to restart the system!
    And I also noticed (this is happen always) that when I copy/move a file the progress bar message box is not shown anymore, I see only the progress in the Finder panel over the file name!
    Thank you.

    Yes, menu bar was visible, honestly I didn't try to use ⌘+N, anyway I used ⌃+Click on the Finder icon (on the Dock) and even if I was able to see the list of Finder windows that were open I wasn't able to switch clickin on it. I've also tried to click on "New windows" (that I think should be the same as press ⌘+N) but no window was shown.
    Thanks.

  • Why my iphoto doesn't show any of my picture?

    I accidently deleted some of my file, and since then my iphoto doesn't show any of my pictures, i mean nothing comes up when I click on it.

    I would post in the iPhoto forum:
    https://discussions.apple.com/community/ilife/iphoto

  • My App Store Doesn't Show Any Thing , and not working .

    Today I've Noticed that My App Store Application is Not Working , and even I Can't Click On any Tabs ,and all of menu bar items such as sign out,sign in doesn't work . and doesn't Show Loading Status Bar, and doesn't show any message as you see in this picture :
    I've Tried There Solutions:
    Reset PRAM
    Delete App Store Cache Files
    Signed Out of Itunes And and signed in again
    clear History and web site data in safari
    But Nothing Changed .
    (Sorry My English is Not Good at all , But i'll be thankful if you help me )

    Test after taking each of the following steps that you haven't already tried. Stop when the problem is resolved. Back up all data before making any changes.
    Step 1
    Sign in to the App Store by selecting Sign In from the Store menu. If you're already signed in, sign out and then sign in again.
    Step 2
    Log out or restart the computer.
    Step 3
    Remove or disable "LittleSnitch" or any similar third-party software that blocks outgoing network connections according to the developer's instructions.
    Step 4
    Start up in safe mode and log in to the account with the problem.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    After testing, restart as usual (not in safe mode.)
    Step 5
    If possible, connect to a different network and test.
    Step 6
    There are reports that resetting the PRAM may solve the problem in some cases. I can't confirm.

  • File(FTP) Adapter doesn't pick any file from FTP server

    Hi All,
    This is a strange problem. I am trying to pick all the file from a FTP server using File Name: . . But the file adapter doesn't pick any file from the directory. When  I change it to a specific file name eg. ABC.txt then it picks up the file ABC.txt only.
    My requirement is to pick up all files in the directory and I just do not seem to understand what is wrong. I have used this wildcard option several times earlier and it always worked fine. But in this case, this does not work.
    I changed the FTP server to point to an internal FTP server and it works fine.
    I have checked all my parameters and everything looks okay. Like I mentioned earlier, if you specify exact file name, it picks up the file.
    Any guess as to what is going on here?

    Transport Protocol: FTP
    Message Protocol: File
    source directory: /test or test ( <b>either one works</b>)
    file name: * or . or *.txt <b>nothing works</b>
    server: ftp server name
    port: 21
    data connection: passive
    user: ******
    pass: ******
    connect mode: permanently
    transfer mode: text
    QOS: exactly once
    poll: 10 secs
    processing mode: archive ( <b>changed to test and delete as well, but made no difference</b>.)
    archive dir: dir path
    file type: text
    adapter specific attributes:
    checked: set adapter specific attributes
    and file name.
    status: active.

  • IPhoto app doesn't show any photos from my photos app

    I just upgraded my new iPad to iOS 6 beta. Maybe that's the problem but suddenly my iPhoto app doesn't show any photos at all. All the tabs (albums, photos, events, etc) are empty.  When I open the app it says "updating photo library" briefly, but that's it. I tried rebooting, deleting the app and reinstalling it, basically everything I could.  Is this a known iOs6 bug?

    Ok, I have the release and I have the issue, photos are just boxes w no pictures, is there a way to remove library and reload? The photo app works fine and all pictures are there.

  • When I try to access my emails the screen opens but doesn't show any emails

    When I try to access my emails the screen opens but doesn't show any emails

    Tap to open a new tab and Private will be at the bottom left of the page. If it is active, tap to turn it off.

  • Tools sync now doesn't show any progress bar???

    I have created sync module for firefox.
    But when i click on : Tools > sync now
    Why it doesn't show any progress bar???
    Firexfox team should look into this matter.
    I love firefox.
    Best Regards,
    Jason Malaysia

    Yup Okay..
    But i'm now wondering, if it run background:-
    Where does it update sync to?
    Is it into my firefox account?
    Where i can see my backup bookmarks?
    Best Regards,
    Jason Malaysia

Maybe you are looking for

  • Unnecessary Purchasing Processing Time in scheduling agreement

    According to its business logic, the scheduling agreement is a document  that has  already been  released  by purchasing department,  and  its scheduling lines, that have been created by MRP  are valid for goods receipt without any need for additiona

  • Problem in BDC for Transaction F-02

    Hi Friends, I am struck up in BDC for TransactionF-02.i am unable to load the data of my test data.when i am loading its loading the second record not the first record. Below is the test data H,RAWATEB,1 M,11072006,ZE,1000,11072006,20,SAR,,,,,RAWATIB

  • How do I transfer photos from Macbook Pro to iPad mini?

    How do I transfer photos from Macbook Pro to iPad mini?

  • Finding a logical name for PXI5112 modules to be used in niScope_Init

    I need to dynamically allocate the number of PXI5112 modules on several PCs in a C++ program. After going through great length using VISA calls to obtain the VISA logical name ( PXI3::11::INSTR, etc.), I found out that niScope_Init is expecting an IV

  • Workflow customization

    Hi I am new in workflow, I have customized the seeded workflow PO Requisition (poxwfrqa.wft) and saved it as xxdpoxwfrqa.wft when i upload it in the database it overwrites the seeded w/f because the internal name for seeded workflow (poxwfrqa.wft) an