Directory creation in JFileChooser

Hello all,
I am using a JFileChooser but the "create folder" button is disabled. How do you enable and make use of this button. I cant find it in the API.
thanks

My mistake, it lets you create new folders once you go to a directory other than the default (my documents). Does anyone know why it doesnt let you create directories in the initial directory when the file chooser is opened.
thanks

Similar Messages

  • Report Directory Creation

    Can you please change the report object to incorporate directory creation?  I'd like to file reports by date/time and dynamic directory creation is needed to do this in Lookout.
    Another way to print screens to pdf (preferred) or html with date/time directories or filenames would be welcome.  Since the report graphic objects are not nameable (by date/time for example), new directory is needed for each report to properly file/separate them.
    Related to this is the ability to make a date object (expression, or other) dynamic included in a filename with the correct numeric format.  No luck so far.
    Ideas/experience welcome!

    Okay, I've got it.  You will need to disable images for this post page to see as typed (without smiley faces...that are NOT supposed to be in my text below)
    Key was to use expressions with embedded text functions such as:
     "cmd /c mkdir \\Domain\Share\lookout\reports\all_rad\"&left(text(if(Sw_All_Rad_Tnd_Live,now(Tmr_5sec),Pt_All_Ht_Start.value),"yyyy-mm-dd hh:mm"),10)&"\"&mid(text(if(Sw_All_Rad_Tnd_Live,now(Tmr_5sec),Pt_All_Ht_Start.value),"yyyy-mm-dd hh:mm"),12,2)
    The above is the value of an expression object that is connected to the run object's "Command line" property which writes the directory yyyy-mm-dd\hh based on a conditional pot value.
    The report's " Output directory" property uses another expression object that is similar, just without the dos command:
    "\\Domain\Share\lookout\reports\all_rad\"&left(text(if(Sw_All_Rad_Tnd_Live,now(Tmr_5sec),Pt_All_Ht_Start.value),"yyyy-mm-dd hh:mm"),10)&"\"&mid(text(if(Sw_All_Rad_Tnd_Live,now(Tmr_5sec),Pt_All_Ht_Start.value),"yyyy-mm-dd hh:mm"),12,2)
    Lookout is power, even if it is clumsy sometimes.
    A separate issue with reports is that the panels I am trying to print are full screen (normally maximized, normal panels).  Unfortunately, when the Panel.graphic is connected to the report.display parameter, it uses the screen property size and does not use the "maximized" equivalent size.
    The issue is that you cannot make a "non" maximized normal panel as big as it is when displayed maximized, so it is impossible to print the entire panel as it is displayed in Lookout.
    It would be great if this could be "fixed" some how.  Ryan....comment?
    Ed
    Message Edited by erblock on 04-28-2009 12:53 AM

  • Directory Creation in Unix/Linux  using sysop group.

    Hi All,
    Directory Creation in Linux using sysop group.
    I want to create a directory using sysop group but it default create using root:root
    I have other user called test:test using test:test sysop group i want create directory
    In java using test:test sysop group how to create directory.
    Is it possible i have checked the File API. I did't find any information.
    Please any one help me.
    Thanks
    Venu J

    I find it worrying that you are able to create a root:root file since this implies that you are running your Java program as user root.

  • Get the file directory/location using JFileChooser

    Dear,
    How to get the file directory and it location with using JFilechooser after select the indicate file?
    Thanks

    There is an example at the top of JFileChooser's doc.
    http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JFileChooser.html

  • Zfs on solaris 10 and home directory creation

    I am using samba and a root preexec script to automatically create individual ZFS filesystem home directories with quotas on a Solaris 10 server that is a member of a Windows 2003 domain.
    There are about 60,000 users in Active Directory.
    My question is about best practice.
    I am worried about the overhead of having 60,000 ZFS filesytems to mount and run on Solaris 10 ?
    Edited by: fatfish on Apr 29, 2010 2:51 AM

    Testing results as follows -
    Solaris 10 10/09 running as VM on Vmware ESX server with 7 GB RAM 1 CPU 64 bit.
    ZFS pool created with three 50 GB FC LUNS from our SAN (Hardware RAID5). There are shared to ESX server and presented to the Solaris VM as Raw Device Mappings (no VMFS).
    I set up a simple script to create 3000 ZFS filesystem home directories
    #!/usr/bin/bash
    for i in {1..3000}
    do
    zfs create tank/users/test$i
    echo "$i created"
    done
    The first 1000 created very quickly.
    By the time I reached about 2000 each filesystem was taking almost 5 seconds to create. Way too long. I gave up after about 2500.
    So I rebooted.
    The 2500 ZFS filesystems mounted in about 4 seconds, so no problem there.
    The problem I have is why do the ZFS file system creation time drop of and become unworkable? I tried again to add to the pool after reboot and there was the same slow creation time.
    Am I better off with just one ZFS file system with 60,000 userquotas applied and lots of ordinary user home directories created under that with mkdir?

  • Selecting all files from a directory in a JFileChooser

    Hello all...
    i m trying to make an application in which i simply print all the files in a directory and their path on clicking and selecting the directory or by pressing the open button of the JFileChooser.
    Any help would be highly appreciated.
    Thanx.
    Salman

    Yet another multi post:
    http://forum.java.sun.com/thread.jspa?messageID=3529802

  • Home Directory Creation using Remote Manager

    Hi,
    We are working on OIM-AD. we have two AD domains in our environment. we need to create home directory folder upon AD provisioning such that only admin or respective user can access the folder. We tried all possible stops but we are not able to assign proper permissions. Also in one of the domain the vbscript for folder creation is run by admin and in other domain it has to be run by domain user.
    has anyone achieved this by means of Remote Manager?

    Hi Cmm user,
    Thanks for your posting.
    To set the attribute of homedirectory for a user in powershell, please also try the cmdlet set-aduser:
    import-module activedirectory
    $HomeDrive=’Z:’
    $UserRoot=’\\CONTOSO-FPS\Users$\’
    $HomeDirectory=$UserRoot+$AccountName
    SET-ADUSER $AccountName –HomeDrive $HomeDrive –HomeDirectory $HomeDirectory
    I hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Directory creation

    These are the steps i followed what's wrong in this
    Physically created an folder in Oracle server 10g called xmlfiles in location C:\
    then connected as system
    CREATE DIRECTORY xmlfiles AS 'C:\xmlfiles';
    GRANT READ,WRITE ON DIRECTORY xmlfiles TO TEST;
    connect to test user
    SELECT directory_name,directory_path FROM all_directories;
    DIRECTORY_NAME DIRECTORY_PATH
    XMLFILES     C:\xmlfiles
    SELECT DBMS_LOB.getLength( BFileName('XMLDIR','BAPLIE_95B.xml')) AS length FROM dual;
    gives me
    ERROR at line 1:
    ORA-22285: non-existent directory or file for GETLENGTH operation
    ORA-06512: at "SYS.DBMS_LOB", line 566
    Physically created an folder in Oracle server 10g called xmlfiles in location C:\
    then connected as system
    CREATE DIRECTORY xmlfiles AS 'C:\xmlfiles';
    GRANT READ,WRITE ON DIRECTORY xmlfiles TO TEST;
    connect to test user
    SELECT directory_name,directory_path FROM all_directories;
    DIRECTORY_NAME DIRECTORY_PATH
    XMLFILES     C:\xmlfiles
    SELECT DBMS_LOB.getLength( BFileName('XMLDIR','BAPLIE_95B.xml')) AS length FROM dual;
    gives me
    ERROR at line 1:
    ORA-22285: non-existent directory or file for GETLENGTH operation
    ORA-06512: at "SYS.DBMS_LOB", line 566

    yingkuan wrote:
    SELECT DBMS_LOB.getLength( BFileName('xmlfiles','BAPLIE_95B.xml')) AS lengtchange 'xmlfiles' to upper case.in addition to yingkuan's advice you'll find the view ALL_DIRECTORIES handy for finding out what things are called and where they point to. It's also worth remembering that identifiers are always uppercase unless you or your development tool are stupid enough to double quote them at creation.
    Niall Litchfield
    http://www.orawin.info

  • How can I check for directory creation?

    Hi,
    I want to check whether I can create a directory at a particular location.
    Let's say at c:\windows, can create a directory called c:\windows\mydir. But I won't be knowing the parent location (i.e., c:\windows here) at compile time.
    And I would also like to check for creating a directory like c:\windows\mydir1\mydir2 (mydir1 may not even exist).
    What I was doing was, I created the file object for my new directory (i.e., mydir here) and used the canWrite() method on the parent directory. But this method worked only when the parent directory existed. But how can check for a directory path like c:\windows\mydir1\mydir2 where I have to create both mydir1 for mydir2.
    Is there any other methods that I can use to perform this kind of a check.
    Thank you

    I finally figured out a workaround, but i don't know whether this is a good way of checking. :)
    import java.io.File;
    public class TryMKDIRs {
         public static void main(String[] args) {
              File file = new File("c:\\mydir1\\mydir2\\mydir3");
              boolean canICreateDir = false;
              if(false == (canICreateDir = file.canWrite())) {
                   System.out.println(file.getAbsoluteFile() + " cannot be created.");
                   File fileparent = file.getParentFile();
                   while(fileparent != null && (canICreateDir = fileparent.canWrite()) == false) {
                        System.out.println(fileparent.getAbsoluteFile() + " cannot be created.");
                        fileparent = fileparent.getParentFile();
              if(canICreateDir) {
                   file.mkdirs();
                   System.out.println("Directory can be created. . .");
    }

  • Home Directory Creation?

    I wonder if someone can help...
    I've just upgraded my server (G5 PowerPC Dual 2GHZ, 2GB Ram) form 10.4.10 to 10.5. I did a fresh install instead of upgrading to prevent there being any problems but unfortunately there is...
    Everything seems to be working fine apart from when i come to create a new user. I select the sharepoint (afp://server.com/Users) in the 'home' tab and select create home now button -> press save and i get the following message:-
    unable to create home directory because an error occurred.
    I've tried allsorts like creating new sharepoints, new users but nothing seems to help.
    Any suggestions?

    I had the same issue. I just got thru doing the third reinstall of Server. (1st. Basic, 2nd Advance, and now third workgroup). On this install it all works fine. On my advanced issue it was a hit and miss situation on what worked for me. So far starting from workgroup and using server admin to manage the system has worked for me to add the little things that workgroup did not provide.

  • UTIL_FILE Directory Creation

    Is there a way to define a directory tree as usable by UTIL_FILE, and have subdirectories within that tree inherit the permissions?
    For instance:
    1) Define '/u01/util_area' as a node with which to use UTIL_FILE;
    2) Then create a subdirectory '/u01/util_area/new_function', allowing use of UTIL_FILE (without the DBA having to specify the 'new_function' directory)

    The answer is NO. You have to create different directory objects in database for your different subdirectoy/directory structures.
    Daljit Singh

  • Is Directory Creation necessary for BFILE ?

    I created a table with one column as bfile
    while inserting the value in that column using directory
    it works fine
    but when i use direct path instaed of directory it gives value error.
    for example: INSERT INTO ABC_BFILE_TEST (B)
    VALUES ( BFILENAME('/export/home/devmgr','karan.txt'));
    this inserts the row but with value error iam not able to open this document.
    for example: INSERT INTO ABC_BFILE_TEST (B)
    VALUES ( BFILENAME('DIRECTORY1','karan.txt'));
    NOW IN THIS CASE directory1 is directory which i created in database
    and represents the same path '/export/home/devmgr' and it works fine
    Actually i have to pass the path and file name on runtime
    so i dont want to create directory.
    Could anybody help me on this.
    Your reply is highly appreciable. :)

    But, as Michael says, I wouldn't recommend using UTL_FILE_DIR parameter.
    It has a big security flaw in that whatever paths you set in it are available for read/write to ALL database users. Not generally a good idea to let every database user have access to all the specified folders on the file system.
    And if you really do think that's the best way to do what you need, you should never (I repeat... NEVER!) set the utl_file_dir parameter to "*" as this will give every database user access to the whole filesystem of the database server, which could be disasterous.

  • Logical directory creation

    Hi
    The output file created by a particular program is being generated and being sotred in the path usr/tmp. The DBA has a requirement of saving this generated output file into a particular path which is /"Instance"/data/jdi/ers/outfile. How do we create this path by creating a logical directory

    Jyothis wrote:
    Hi SY,
    Well, thanks for the input, But the DBA does not want a directory to be created. The requirement is to make the output file ie. being generated into the path usr/tmp to be generated into the path "instance-name/data/jdi/ers/outfile";Is here any method of creating the output file in a logical directory that has the path mentionedHow are you generating the file in /usr/tmp now? Just do the same thing except use instance-name/data/jdi/ers/outfile instead of /usr/tmp.
    John

  • Replicate directory creation....

    I have a question that may be silly, but I have databases with a directory structure something like the following:
    $HOME/db1/file.db
    $HOME/db2/file.db
    $HOME/db3/file.db
    When a new db is added to the environment the directory is created and the associated database files are added to the subdirectory.
    While I haven't tried this yet, it seems that replication will not replicate the directory structure and would fail on adding a newly created set of dbs ( in their associated sub-directory ).
    Is there a way ( or is it handled by default ) to replicate a sub-directory structure in the database environment to manage database files? Would I need to do application specific logging/recover for that to work? My understanding is that replication uses a different code path than normal updates, so I'm thinking that it may not work.
    I hope that question makes some sense. Note that I also really want to use the replication infrastructure of the replication manager if possible.

    Yea, it does sound like I would be, but it wasn't clear. I wasn't sure what "a subdirectory below the specified directory" really meant. Sounds like that means it can't be in a subdirectory of a directory specified by set_data_dir, correct? Seems obvious enough. Not sure what got me about that verbage.
    My idea might have been somewhat silly in that I could create a log message when I create the directory. Then when the log was played forward I'd just make sure the directory existed. Seemed like alot of work.
    OK, so let's assume I take the route of putting all replicated databases in data directories set by set_data_dir ( either DB_ENV->set_data_dir or in the DB_CONFIG file ). The one thing that isn't clear is how do I specify the data_dir when creating a database using DB::open )?
    So I guess taking a step back, what I really liked about having sub-directories in a data_dir is that it's easy to manage ( I can move a subset of data easily to another mount point, etc ). Given that BerkeleyDB can handle Terabytes of data ( and I doubt everyone has mount points that handle terabytes of data ), I'm guessing some of the data management questions have come into play for others. What's the most common way of allowing for multiple directories ( and placing new DBs in specific directories ). Would I just specify multiple data_dir values and then open them using an absolute pathname? Seems like that would work.
    thanks for the response.

  • InfoPath - Directory Creation

    Can I use an InfoPath form to dynamically create a directory on a server?
    I need for my users to be able to upload a bunch of files at once, by selecting all of them at once instead of uploading them one at a time.
    And if I can configure an InfoPath form to dynamically create a directory on submit, and then pop open a Windows Explorer window to that directory, my users could just click and drag or copy and paste.
    Thank you

    Check if below answer your question
    http://www.bizsupportonline.net/blog/2010/04/top-10-questions-infopath-file-attachments/
    there is no out-of-the-box control for that functionality in InfoPath. Drag and drop is heavily dependent on JavaScript and/or jQuery and frameworks that build on the two. 
    InfoPath does not utilize these frameworks.
    You can use a button to upload a file. Some third party tools, like Qdabra's QRules (not free, but worth every cent) have tools to manage file uploads into browser forms with a few more bells and whistles. But no InfoPath technique I have seen so far allows
    drag and drop to attach a file. 
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for

  • Mid-2009 MBP wouldn't wake. Report inside.

    Hi all, This isn't the first time this has happened, but it has been a long time since the first time. A little about my MBP: Snow Leopard 10.6.8 3.06GHz Intel Core 2 Duo 6GB 1067 MHz DDR3 2GB Apple RAM/4GB Kingston RAM (other Kingston RAM chip teste

  • Aperture book copyright question!

    Hey...I was wondering if it would be allowed to make Aperture books and resell them....obviously if I do not own the copyright then I a cannot...but let's say I take a bunch of pics of my hometown and make a book and ask Apple for copies of this book

  • Itunes is moved to another place on my pc, can´t open it

    after some time not using Itunes on my pc i can´t open it, message says it has been moved to another place, unfortunately not where... same at the pc of my husband....we installed the program in March 2012

  • Where to change computer's name?

    My brother just bought an iMac and I've been trying to help him via the phone to get things set up. He's a switcher and so there's some interesting communication that happens. I have a new found respect for anyone who does phone help-desk troubleshoo

  • Delegation of permissions to join computers to domain

    Hi Am having some issues with delegating permissions to users for joining machines to the domain. I have delegated permissions to a group of users which allows then to join machines to the domain, they can join and disjoin but the only problem is the