Explorer-like GUI

HI guys! i'm back again to ask for some help with my program. My problem is actually about files. How can i determine the size of a file? I have looked at the File class API but i see nothing about getting the file size (i.e. File.getSize()). Is there anyway i can do it in java? And secondly, i want to build an Explorer-like GUI in java using Swing. In there, i want to list the file name, file path, and the file size in columns (Table :-) ). Can this be possible? Thanks a lot to all of you! I'll surely appreciate your help!!! have a nice day :-)

perhaps File.length() is the one.

Similar Messages

  • How to create a "Explorer" like in java

    i'm just wonderin if there's a way on how to create "Windows Explorer" like in Java wherein you can view all your directories with yellow folder icon and also you can view all your files and drives....
    And when you double click the yellow folder icon it will then expand and will show all the subfolders and files ...
    How????
    Thanks!

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

  • Re: Explorer like user interface

    Re: Explorer like user interface
    You'll want to use the geometry management features in Forte.
    These can be controlled using the WidthPolicy and HeightPolicy
    attributes on FieldWidget (see p 160 of the Display Library manual).
    You can set these in your code, or using the 'Size Policy' dialog
    off the widget property sheet.
    Do the following:
    Create a Window class, get into the Window Workshop.
    In the Window property sheet, set the Window Style to Resizable,
    set Autosize Enabled.
    Create your TreeView and ListView, group them into a GridField.
    In the TreeView and ListView Property Sheets, under Size Policy,
    set the Width Policy and the Height Policy to Parent for both
    the ListView and TreeView. Also set a minimum size for each (in mils)
    the minimum size will prevent you from getting too small a window.
    For the GridField, also set the WidthPolicy and HeightPolicy to Parent.
    You may also want top set the Column Weight to the ratio you want for
    the sizing of the Tree and List, say 2:3.
    Now the sizing will work. You'll just have to write the code
    to get data in you TreeView and ListView. Looking at
    the examples for outline field:
    $FORTE_ROOT/install/examples/display/soutline.pex
    is a good place to start, if you haven't done it before.
    Good luck!
    Thanks, -Mark
    X-Originating-Ip: [40.33.1.12]
    From: "Ramarao P" <[email protected]>
    To: [email protected]
    Subject: Explorer like user interface
    Date: Fri, 19 Jun 1998 11:50:08 PDT
    Sender: [email protected]
    Reply-To: "Ramarao P" <[email protected]>
    Hi,
    I would like to design a window which is similar to Windows Explorer.
    Treeview in the left side, listview in the right side. I should be
    able to drag and expand the size of the treeview. How is this possible
    in Forte? I tried to use STATE attribute of widgets, but did not
    succeed. Could anyone suggest me how to go about it.
    Thanks in advance,
    Ramarao
    International Business Corporation-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Just to complete, here is a little sample in R3.F.2.0 done with
    Treeview and listView.
    Be aware that to give the user the possibility to resize the left
    part, you should manage it yourself. If you use an outlinefield
    instead, you can put WidthPolicy to seleted and then use FS_ROUTE
    state to enable the user to resize it. But this occurs a bug with the
    resize of the window. If you try this with the treeview, it will
    be converted to FS_SELECTONLY which is nonsense here.
    Also, don't forget that ListView only does Ascending Sort (Microsoft
    does Ascending and Descending). So you should need to manage sort
    yourself too.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Mark Wallace wrote:
    >
    Re: Explorer like user interface
    You'll want to use the geometry management features in Forte.
    These can be controlled using the WidthPolicy and HeightPolicy
    attributes on FieldWidget (see p 160 of the Display Library manual).
    You can set these in your code, or using the 'Size Policy' dialog
    off the widget property sheet.
    Do the following:
    Create a Window class, get into the Window Workshop.
    In the Window property sheet, set the Window Style to Resizable,
    set Autosize Enabled.
    Create your TreeView and ListView, group them into a GridField.
    In the TreeView and ListView Property Sheets, under Size Policy,
    set the Width Policy and the Height Policy to Parent for both
    the ListView and TreeView. Also set a minimum size for each (in mils)
    the minimum size will prevent you from getting too small a window.
    For the GridField, also set the WidthPolicy and HeightPolicy to Parent.
    You may also want top set the Column Weight to the ratio you want for
    the sizing of the Tree and List, say 2:3.
    Now the sizing will work. You'll just have to write the code
    to get data in you TreeView and ListView. Looking at
    the examples for outline field:
    $FORTE_ROOT/install/examples/display/soutline.pex
    is a good place to start, if you haven't done it before.
    Good luck!
    Thanks, -Mark
    X-Originating-Ip: [40.33.1.12]
    From: "Ramarao P" <[email protected]>
    To: [email protected]
    Subject: Explorer like user interface
    Date: Fri, 19 Jun 1998 11:50:08 PDT
    Sender: [email protected]
    Reply-To: "Ramarao P" <[email protected]>
    Hi,
    I would like to design a window which is similar to Windows Explorer.
    Treeview in the left side, listview in the right side. I should be
    able to drag and expand the size of the treeview. How is this possible
    in Forte? I tried to use STATE attribute of widgets, but did not
    succeed. Could anyone suggest me how to go about it.
    Thanks in advance,
    Ramarao
    International Business Corporation-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • IPhone like GUI for the 755p - Touch Launcher

    Bought an app yesterday for my 755p.  It is called Touch Launcher and it provides an iPhone like GUI to the phone.  I think it is pretty cool.
    In the TouchLauncher Options menu, i'm able to scroll what i'm presuming all of the apps installed on my phone.  I simply assigned camera to the camera icon, clock to the clock icon....
    But, I'm stumped when it comes to assigning an app to the SMS icon.  I just don't see any name in the scroll down menu that resembles SMS.  Does anyone on this forum know the name of the file or app that i should select for SMS in my 755 running palm os?
    TIA 
    Post relates to: Treo 755p (Verizon)

    Thanks.
    googling like crazy have learned that Touch Launcher is V2 of this app.  iPhoneImpersonator was V1.  Thats the one i have.  V1 is more to my liking.  Anyways, the SMS app is identified as Nexter.  That's not quite so intuitive as camera...
    Thanks for the help.
    Oh, if anyone knows how to turn off the 755 keyguard so the iPhoneImpersonator 'touch and slide to unlock' (like the iPhone) is the default, I'm curious.  I've emailed the author but haven't heard back.  I will close this thread when he does.
    Thanks. 
    Post relates to: Treo 755p (Verizon)

  • How to make Folder Explorer  like windows with ADF

    I want to make a folder explorer like windows like this image
    http://img837.imageshack.us/img837/4296/sshot7z.png
    I want to make a folder explorer like windows when click on a folder on the tree it expands and shows its sub-folders and its content or show the files inside the folder in another place in the page
    is this possible to be done with ADF .
    I need help in this.
    Thanks in advance.

    Hi,
    Your use case is extremely vague. However, assuming you simply meant the look using ADF Faces, you can simply use the tree component with correctly defined icons to get that. See http://jdevadf.oracle.com/adf-richclient-demo/faces/components/index.jspx?_afrLoop=30572603018616864#%2Fcomponents%2Ftree.jspx%40
    Regards,
    ~ Simon

  • Explorer like menu

    First of all i know little in programming java and i am reading the java tutorials on this site and a book and im slow to learn but i think im getting some.
    OK, i would like to ask. i am doing a program that needs a user to be able to access the contenets of the drive c and all of its drive from within the program itself. i know of the one where you use the file open menu but then how could i do it with placing the windows explorer like thing in an application. If you dont understand i can stillclarify thank you for reading this post.

    I hope this helps:
    In your Swing application, include a menu item called "Open" (or whatever you want) and attach an ActionListener to it.
    When someone selects the menu item, the ActionListener will be called.
    Have the action listener then display an instance of JFileChooser (read up on JFileChooser, as you can specify lots of parametres that govern its behaviour).
    If you want to make the user experience more like windows, you can also set the Look-and-Feel to "system". But that's another thread ... :)

  • An explorer-like program.

    Hello.
    I did not find a specialized forum to post this question, so here it comes.
    I'm creating a program with many "windows explorer" like features. It seems to me that it's likely this already exists - and it would be pointless to program this from scratch.
    Do you know a program with source that has explorer like features (i.e. surf through the files etc.) ?
    I found javaexplorer on sourceforge, but I can't get it to run in NetBeans(it is java 1.4, and renaming enum to enume does not get rid of the runtime errors, though it does compile it)
    Thanks

    @annie: well. There is a NullPointerException. I don't have the details now, because I already deleted the project from NetBeans.
    The thing is, is that a good program ? Or is there a project going on programming something with explorer-like features (javaexplorer seemed dead) ?
    @chuckbin: yes, I know that class, thank you very much.

  • Generation of tree like GUI

    Hey guys,
    I need to create a GUI which looks something like the left side content section of this webpage. If I click on the + sign I can see more topics that are there in that items.
    http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac00490_.htm
    Can anybody tell me which java API library should I use in order to create that tree like structure.
    Thanks.

    You can do that in Swing with JTree

  • How to retrieve items from Windows Explorer like My Computer?

    How can a java program retrieve item names in the Windows Explorer directory structure [i.e. items in the left pane like Desktop, My Computer, Printer, Control Panel, Dial-up Networking etc.]. I retrieved all the drive names and directories using java.io.File class and displayed using JTree.

    I don't believe that a lot of those items are actually "files" and directories, if you use the "dir" command in a DOS box from your Desktop I don't think you can find them...if you can then they are files etc...
    Since stuff like "Control Panel" is OS specific (i.e. Windoz) then Java wouldn't support it in the core API...

  • Explorer like user interface

    Hi,
    I would like to design a window which is similar to Windows Explorer.
    Treeview in the left side, listview in the right side. I should be
    able to drag and expand the size of the treeview. How is this possible
    in Forte? I tried to use STATE attribute of widgets, but did not
    succeed. Could anyone suggest me how to go about it.
    Thanks in advance,
    Ramarao
    International Business Corporation
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    I would like to design a window which is similar to Windows Explorer.
    Treeview in the left side, listview in the right side. I should be
    able to drag and expand the size of the treeview. How is this possible
    in Forte? I tried to use STATE attribute of widgets, but did not
    succeed. Could anyone suggest me how to go about it.
    Thanks in advance,
    Ramarao
    International Business Corporation
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Howto create an explorer-like rectangle selection??

    Hi,
    I created a more advanced Custom FileChooser, because I didn't like the standard JFileChooser. It works pretty good, but there's one thing I'd like it to have, but I have absolutely no clue on how to program this...
    My FileChooser consists of 3 JLists. In one List, there are the files of one folder displayed. Now I would like to implement the ability to drag a rectangle-selection to select multiple files in the JList, just as we know it from the Windows Explorer.
    Can you please help me creating that, I don't know how this can be realized, as I've never ever used the paint() and draw-Functions in Java. Also, I can't imagine how to let the rectangle realize, on what files it is drawn, to mark them as selected...
    Thank you for help,
    Ciao, AntiBit

    Well, let's see... I would probably start by setting up a mouse listener as illustrated in the tutorial example referred to above. Use the mousePressed() method to get the first corner of your rectangle and store the x and y values in class variables. Then use the mouseDragged() method to get the next corner x and y values and store these.
    At this point, I would have the mouseDragged() method also call repaint() on your glass pane component - the tutorial example provides an overridden paint method for the glass pane component, and you could do the same thing to draw your rectangle. This way, anytime you drag the mouse over it, the glass pane can redraw the rectangle in its new size/position. Might look something like:
    public void paint(Graphics g)
       if (x1 >= 0 && y1 >= 0 && x2 >= 0 && y2 >=0)
          g.setColor(Color.black);
          g.drawRect(x1, y1, x2, y2);
    }Finally, when mouseReleased() is called, it could reset the variables to -1, which would indicate to your overridden paint() method that no rectangle should be drawn. Hope this helps somewhat - I'm not sure of any specific tutorials that might help - maybe the one on applets?
    Good luck

  • Extremely slow accessing folders in explorer (like 1 or 2 minutes) on SATA drive

    OK, where to start ... About a year ago I bought this motherboard.  I have one 80 GB WD IDE and one SATA WD 160 GB drive on the integrated Promise controller.  I loaded the Promise driver that came with the motherboard and everything was working, no problems accessing either drive.  I noticed that that there was a newer driver for the Promise controller so I downloaded it and installed it.  After that, whenever I tried to expand folders in explorer on the SATA drive, it would sit there from anywhere from 1 to 2 minutes before showing the folders underneath it.  So I reverted back to the old driver and everything worked normal again.
    This past weekend I decided to wipe my machine before applying Windows SP2.  So I formatted the 80 GB WD IDE drive (I didn't touch the SATA drive, I use that primarily for data storage).  I installed Win XP Pro with an integrated SP2.  After installing I couldn't see the SATA drive because the driver hadn't been loaded yet.  So I went to MSI's site and downloaded the Promise driver and installed it and rebooted.  I could see the drive but the same access problem occured.  It either takes a minute or two to browse the folders on the drive or sometimes it just hangs when trying to access folders.  I found my old Promise driver disk that came with the mobo originally but after installing that I still had the same problem.  I then re-installed again but this time I used the F6 to load the Promise driver (from the disk that came with the motherboard) during the windows installation.  I still had the same problem.
    I searched the forums here but the hits I get are people complaining that their SATA drives aren't performing as fast as their IDE's etc.  On the net I did find one guy who has the exact same problem as I do but he didn't have a solution to the problem and no one posted a possible solution to his problem.  Anyone have any ideas or have experienced a similar issue?
    P.S. - I'm not overclocking my PC and I have the latest BIOS revision.

    I've had this exact problem from time to time too, and am having it again after a fresh install of WinXP (updated to SP2).
    I find it occurs when I boot up with a DVD data disc in my Memorex DVD writer. Seems to have some thing to do with the Drag-to-Disc software interacting oddly with the OS. This software is part of the Roxio package for managing DVD writers, and comes with the memorex writer.
    If I make sure I don't have a disc in the drive, then everything's fine. If I do have one, and simply wait long enough for something to time out in the boot process before logging in and starting to do anything, the problem doesn't appear either. It only shows up if I reboot with a DVD-ROM in the drive (Actually, to be absolutely accurate what was in the drive was a DVD+RW that I had written ordinary files to), log in as soon as I get the login screen, then try and open an explorer window.
    If I boot with the drive empty, or go away for ten minutes or so during boot and come back and log in, no problem.
    I've got two removable drives in my system, one a DVD writer, the other a straight DVD reader. Both on secondary IDE channel, writer is master, reader is slave. System disc is a 120GB seagate on the ICH5R SATA-2 channel, Promise is configured with a RAID 0+1 array of 4 200GB WD discs (two SATA, two ATA/100 on IDE 3).
    Try pulling your CDROM IDE cable so that there is no CD drive in the system, reboot, and see if the problem goes away. You might be having some sort of interference from the secondary IDE channel, or some driver that talks to the CDROM or DVD drive(s) causing problems like I have been.
    Good luck, and let us know what results you get from trying this experiment.

  • PETITION: Show Duplicate Files In Media Explorer Like In iTu

    No doubt that many of us have duplicate song files on our Zens.
    It seems to me that since I can't see individual song files like I could under the old Media Explorer (before the Plays For Sure upgrade) it would be nice to see some sort of Duplicate Files searcher when the Zen is plugged in.

    A possible source of your problems could be multiple tags. See My iTunes library and metadata/ID3 tags issue for some thoughts.
    There is a danger that as you remove one of the redundant tags iTunes might read back the old data from another. It might pay to use my script ExportImport to backup the metadata first just in case.
    If you want to make the filenames in Explorer match the tag properties then the script ConsolidateByMovingLong might help.
    tt2

  • Is it possible to build a shutter like GUI?

    hi, i have a question after looking at one screen shot of fxruby.. can java do something like this? since i can't find anything online.. the screen shot is here: http://programer.name/shutter.png.. it's doing something like outlook, where they have different "shutter windows".. mmm.. if you have seen it done somewhere, or if there is a standard package i have overlooked, please point it out to me :D thanks :D

    the outlook look alike would be the one :D though, i have no idea what does JSplitterPane look like.. mmm.. though, the link you gave me is for commerical license? is there a free (open-source possibly) implementation of it?

  • Desktop Agent "like" GUI for general subscribers?

    Anybody out there know if there are any 3rd party browser based plugins available for the everyday user? Many of the users here have headsets and would rather click buttons on the screen to answer and hangup and so forth. Rather than have to operate the physical phone.

    Hi,
    Have you associated the attendant console user to the phone?
    Have you seen this yet?
    http://www.cisco.com/en/US/products/ps6844/products_data_sheet0900aecd804cab51.html
    Cheers,
    Tim.

Maybe you are looking for

  • How to get my camcorder recognize

    Our Church uses a HRV-HD1000u camcorder for the last two years it would be recognize by computer when tape is turned on.  Recently when the camcorder is turn on the compu.ter doesn't recognize the camcorder.  I have tried another computer and the cam

  • Berkeley DB on Windows Cluster

    Does anyone have experience running a Windows service that uses Berkeley DB on a typical active/passive Windows Cluster with shared disks? Is it even possible with Berkeley DB? Just to avoid confusion, I am not talking about replication, but about a

  • Color of Navigational Bar background

    The background color of the navigational bar is coral....when I click on it, there are no options in the graphic inspector. Is there a work-around for this? I'd like it to be gray, or even white. Thank you.

  • How do I delete an uncompleted saved folder in Time Capsule?

    I have spent more than a few days searching for an answer to this problem in the support forum without success. I was saving an important Folder from a previous 3 year old MacBook Pro as data folder (not backup) into my Airport Time Capsule, also abo

  • Missing disk 2

    I'm trying to install Tiger on a Pismo Powerbook. But I don't have "disk 2" of the 4 disk set. According to: http://support.apple.com/kb/TA24615 I should be able to do a basic installation from disk 1 alone. However, the articla is not accurate. It s