JFileChooser -- how to display the system roots--

I am suprised I cannot find this answer by doing a quick search on Google but when my file choose inital opens I would like it to display the root of the file system.
For example on Windows when it opens I would like it to show C:\, F:\,.. whatever drives the user has. I know this has to be something simple any help would be appreciated.
Thanks,
Rob

hi!
You can get the roots using FileSystemView.getFileSystemView().getRoots().
Hope this helps.
chris

Similar Messages

  • Please provide an example of how to display the system time in CNiNumEdit.

    I need to display elapsed time in a numeric edit control. The value must be a double. Using MFC, please show me an example that displays the system time in a CNiNumEdit control.

    The trick is to set the FormatString of the num edit control to a format that displays dates/times and to use the COleDateTime class to handle converting the date/time to a double. COleDateTime encapsulates time stored as a DATE, which is a typedef for double. COleDateTime uses the same conversion factor for date/time as what the num edit expects, and since it supports a conversion operator to a DATE, which is really a double, and the num edit Value property is a double, displaying the current time in a num edit can be as simple as this:
    // Assuming you have a member variable called m_numEdit for a CNiNumEdit
    m_numEdit.FormatString = _T("hh:nn:ss");
    m_numEdit.Value = COleDateTime::GetCurrentTime();
    Hope this helps.
    - Elton

  • How To Display the directories of a System.

    How To Display the directories of a System.

    Hmm I think you need to be more specific. Do you mean like this:
    File f  = new  File("c:/");
    File[] fs = f.list();That lists all the files in that folder, then you can use the method isDirectory to check it. Mind you, you would have to go though every folder.

  • Writing to the System root in UNIX

    My Application creates charts and puts it in a root directory of the System.How to use java api to read it back in and display the Image since the directory where the charts are being generated is outside the
    Root Context of the Application. For e.g the generated charts are within
    /tmp/charts/ if i write ../../../tmp/charts or /tmp/charts the image within the directory doesnt gets displayed on the web page.
    Thanks in Advance

    Thanks !! but i think u didnt get my problem.In the UNIX machine i have an jpg image File at the System Root directory called /tmp/charts.
    In the same Machine there is weblogic Server which hosts my application.In my Application i need to display that Image stored at the Root. How to access the /tmp/charts directory from the Root-Context
    of my Application..If i do like <img src="../../tmp/charts/sth.jpg" it doesnt displays the Image unlike in Windows.What should i write in the img src to display that Image.

  • How to display the proxy settings for a specific group of servers in an OU ?

    Hi,
    Can anyone here please assist me in how to display the value of Proxy server settings from the computers in a specific OU member ?
    $Computers = Get-ADComputer -Filter * -SearchBase "OU=Terminal Servers,OU=Servers,DC=domain,DC=com" | Where-Object { Test-Connection $_.Name -Count 1 -Quiet }
    ForEach ($Computer in $Computers) {
    | Export-csv "C:\Proxy-Setting-Results.csv" -Append -NoTypeInformation -UseCulture
    I've done similar script for some other task but not sure how to do this for Proxy setting.
    Thanks.
    /* Server Support Specialist */

    Proxy settings are not set in Active Directory
    The below code works for 2003 servers and Win XP
    $colItems = get-wmiobject -class "Win32_Proxy" -namespace "root\CIMV2" `
    -computername $env:computername
    foreach ($objItem in $colItems) {
    write-host "Caption: " $objItem.Caption
    write-host "Description: " $objItem.Description
    write-host "Proxy Port Number: " $objItem.ProxyPortNumber
    write-host "Proxy Server: " $objItem.ProxyServer
    write-host "Server Name: " $objItem.ServerName
    write-host "Setting ID: " $objItem.SettingID
    write-host
    You can try checking the registry values- Works in 2008 + and Windows 7
    Get-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
    or use netsh
    netsh winhttp show proxy -r <remotemachinename>
    Regards Chen V [MCTS SharePoint 2010]

  • How to display the time length of video (current time/ total time) ?

    Hi,everyone. I would like to ask how to display the time length of the video which show only in system example: it show the current time and total time? using AS 3.0.
    It there any information or solution to solve it? .
    I appreciate it any of you able to answer it. ^^
    Thank you.

    Hi,
    Actually I have this requirement for MAC OS 10.5. With the code you provided, I got the output as "6289375". When I changed the URL to point to my file (file:///Users/VPKVL/Desktop/MyRecord/tempAudio.wav), I am getting the below mentioned Exception:
    Exception in thread "main" javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
         at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:165)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
         at TestWavLength.main(TestWavLength.java:13)The "tempAudio.wav" file is created by using java sound API. I am using the SSB USB Headphone Set to record the audio with the following settings for AudioFormat object:
    AudioFormat audioFormat = new AudioFormat(
              AudioFormat.Encoding.PCM_SIGNED, // the audio encoding
                                                            // technique
              48000.0F,// sampleRate the number of samples per second
              16, // sampleSizeInBits the number of bits in each sample
              2, // channels the number of channels (1 for mono, 2 for
                            // stereo, and so on)
              4, // frameSize the number of bytes in each frame
              48000.0F,// frameRate the number of frames per second
              false); // bigEndian indicates whether the data for a single
                            // sample is stored in big-endian byte order
                            // (false means little-endian)Can you please suggest where I am going wrong ?

  • How to get the system info in a network

    Hi to all.
    can any one tell me how to get the system related,like system name and logged user ,info in a network using java...
    thnx in advance,
    ashok

    There is quite a bit of data that is stored in the System Properties. Run this little test app and it'll display all of the System Properties, what you are looking for may be contained in there:
    public class Test {
        public static void main(String[] args) {
            System.getProperties().list(System.out);
    }

  • How to display the Current Date on page using ADF Components

    Hi,
    Is there any way to display the system date on a page developed using ADF Components.
    I am thinking of writing the java code to display the date. Just wanted to check is there any pre-defined component of ADF that I can make use of.
    Could anyone tell me how to do this using ADF components?
    Thanks in advance.
    Sivaji....

    Please refer the below link.
    Prompt  with  default  date   (  currentdate-1  and current date-8)
    http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Regards,
    Bilahari

  • How to display the JSP output in the same page....

    im new to JSP..... can anyone tell me how to display the output of a particular JSP page in the same page itself...... if anyone could send a small sample code it will be very useful for me....
    thanks in advance
    regds
    Krish......

    Hi Robert -
    When you say you are writing a template-based Renderer, do you mean that you are creating a custom look and feel and replacing the header Renderer? If so, I'd recommend instead simply creating your own template (not template-based Renderer), and reference your template directly from your uiXML pages where you want to insert the timestamp.
    You'll probably want to write a method data provider which calls System.currentTime(), convert the result to a date, and then use Java's date formatting capabilities (see java.text.format.DateFormat) to produce a user presentable String that you can return from your data provider.
    For more info (and samples) on templates and data binding, see the "Templates and Data Binding" section of the "Includes and Templating in ADF UIX" help topic:
    http://tinyurl.com/5b7bf
    Andy

  • In sales stage combobox how to display the step of the process coach

    On the business talk page, in sales stage combobox how to display the step of the process coach and can be selected, not only sale stage?
    thank you.

    For example, in salesprocess list, there are SystemSaleProcess, RenewalSalesProcess and DefaultSalesProcess.
    And SystemSaleProcess includes grasp of the situation, the first proposal, estimate submitting, the second proposal 4 salesstages.
    And grasp of the situation, including needs confirmation, background of the case confirmed, current problem confirmation, schedule and estimate confirmations, current system configuration confirmation 5 steps.
    Now in deal page, the deal type selected SystemSaleProcess, the salesstage is grasp of the situation, the first proposal, estimate submitting, the second proposal 4 salesstage can be selected in the salesstage drop-down box.
    But if want to choose more than salesstage, would like to choose needs confirmation, background of the case confirmed, current problem confirmation, schedule and estimate confirmations, current system configuration confirmation 5 steps in the salesstage drop-down box, then how to do it?
    thank you.

  • [help]How to display the subsets

    I'd like to know how to display the subsets of the set that has
    k elements.
    For example,
    if a set S={a,b,c},
    then its subset is
    {a},,{c},{a,b},{b,c},{a,c},{a,b,c},null}.
    How do I code the above program in Java?
    Any help??

    public class Subsets {
      public static void main(String[] args) {
        int k = Integer.parseInt(args[0]);
        int sets = 1 << k;
        for (int i = 0; i < sets; i++) {
          if (i <= 0) {
            System.out.print("{null}");
          else {
            StringBuffer buf = new StringBuffer();
            int j = i; char c = 'a';
            while (j > 0) {
              if ((j & 1) > 0) buf.append(c);
              j >>= 1; c++;
            System.out.print("{" + buf + "}");
        System.out.println();
    }

  • In sap scripts how to display the driver program

    Hi,
        I Want to know the sap scripts How to display the output to driver program

    Hi,
    Go to NACE Transaction.
    Select application for ex: if sales V1.
    Click on output types.
    Select the output type for ex : BA00
    Double click on Processing routines.
    There you can find the Driver Program name and Script/smart form name.
    Reward if useful.
    Thanks,
    Raju

  • How to get the system time in a Swing application ?

    I know how to do it in JavaScript, but not java. Please help me, and also how to get the system time in an Applet. Thanks !!!

    Check this link, I hope it helps
    http://202.71.136.142:8080/globalleafs/Swing/View.jsp?slno=22&tbl=0

  • How to display the sort value in the selection screen in the report title

    Dear All,
    How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
    Good day,
    Thanks and regards
    Arun S

    Hi Arun,
    Try this.
    1, Set one dynamic parameter,
    2, Drag and drop that parameter into  your report title.
    3, Pass the value(sort value) dynamically from your application,
    4, Cheers..
    Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then  set the data source from CR designer. and darg and drop that data column into the report.
    Hope this will work,
    Regards,
    Salah
    Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

Maybe you are looking for

  • Copying video files from one external drive to another

    Hello! I am very new to Apple and FCP, so please forgive my ignorance. I have looked through the other topics and have not found one that addresses my question, so please forgive me if this has been addressed in the past. I am working on a project an

  • Download to excel in not coming in alv popup

    Hi All, Please have a look at the demo program SALV_DEMO_TABLE_POPUP.  The ALV displayed as a popup don not have button to download the data into a excel sheet/ spread sheet. Can someone please suggest how it can be added to alv toolbar ? I  have sim

  • Datawarehouse job run forever and powershell doesn't allow to enable

    It seems that my datawarehouse jobs was running forever without any report producing. I check the jobs enabled and it tell "no" every job except MPSyncJob. Every job status is running as "running" or "not started". I tried to enable the datawarehouse

  • Problem uploading enhanced and crop photos

    When I upload enhanced and crop photos from my iPad2 to Dropbox the original photo gets uploaded. I am using the native iPad photo app on my iPad2 to enhance and crop  I see that there are others with similar problems but no real solution. Don't know

  • When I open up a new tab, how do I get rid of the default 'Bing' tab?

    When I click on the + sign for a new tab, the Bing search engine comes up. How can I modify the tab content? I have tried 'Tools' and 'Tabs' option, but nothing works for me under there. My husband's Mozilla tabs comes up with multiple pages he has b