Save/open  file box

I would like to make a pop up box that given a path to a file on a disk can do either:
save File: <path to the file> (new location)
or
Open File <path to the file> (with a matching application)
I have tried modifying the code from this tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/examples/components/FileChooserDemoProject/src/components/FileChooserDemo.java
But I can't seem to specify the file that is already located on the disk.
Open File can be done using Desktop.browse(URI), but how do I create a FileChooser box with two buttons for saving or opening a file already on disk?
Edited by: fedevaps on May 14, 2009 9:30 PM

So you have a file which is already on disk? And you want to present the user with an option whereby he can "save" that file, which is already on disk, to some other location on disk? This sounds peculiar already... how exactly does that work in your proposed design? Do you just tell the user where the file is and then display a standard save dialog which tells you where you're going to copy the file to? (Or move it, if that's what "save" means in your terminology?)
Usually a save dialog is used for the user to select the file where your program will save data that's in memory. You've used save dialogs before, surely? Every text editor uses them.
And this idea of a dialog which allows the user to do two different things, that's kind of peculiar too. If it were me I would have two buttons, Save and Open. The Save button would open the save dialog, the Open button would open the open dialog.
And if you hadn't already figured it out, an open dialog doesn't actually open the file selected. It just allows the user to select a file and passes that file back to its caller. It's the caller's responsibility to do whatever "open" means to it.
Likewise a save dialog doesn't actually save the selected file. It just allows the user to select a file, then the caller actually does the saving to that file.
You'll find programming much easier if you do things in the normal way just like everyone else. If you do it differently, then first of all you can't use the standard tools and you find yourself floundering, trying to modify them or rewrite them or bend them out of shape. And second of all, your users will be confused by a non-standard interface.
And don't tell me you're thinking "outside the box" when you do things in a strange way. First you need to know where the box is and how it works. Then you'll be able to think outside it.

Similar Messages

  • "Save to File" box Syntax

    What is the syntax to be used in the "save to file" box when one is streaming multiple streams?

    What is the syntax to be used in the "save to file" box when one is streaming multiple streams?

  • Export Save / Open dialog box appears behind disco screen

    Hi all
    Disco 10g Plus, excel, latest Sun java 6.16 jvm
    We have an annoying but strange issue with exporting.
    A user opens and runs a report ok.
    Withing Disco 10 plus they then click on either file-Export-excel or click on the Export Excel icon on disco plus toolbar
    Either way the export happens and a dialog box appears with blue progress bar and then this disappears.
    And then nothing appears to happen.
    However, something actually has happened, behind the disco 10 window the 'File Download' dialog box with 'Do you wish to open or save this file?' appears. Clicking on save saves it to PC and clicking open opens it in Excel which is fine.
    I am not sure of this box belongs to excel or internet explorer but does anyone know of any way to have this dialog box appear IN FRONT of the current disco plus window as some of our users think that disco has 'frozen' and thus log support calls.
    thanks in advance,
    dw
    Edited by: derrywriter on Sep 30, 2009 2:40 PM

    Hi dw
    I have heard of folks complaining that exports to Excel hang. I have not had any feedback to say that the dialog box is actually open behind the scenes. This is very interesting news and thanks for reporting it. I will certainly look for this in the future and see if I can find a pattern.
    If I may ask, what exact version of Discoverer are you on and what cumulative patch level have you implemented?
    Also, what browser are you using and have you tried this in another one?
    Have you tried deinstalling Java 6.16 and tested with an older one like 6.11 which I have seen working very well?
    As much extra information as you can provide will definitely help and could trigger an idea from someone reading.
    Best wishes
    Michael

  • Save Open dialog box opening very slow

    I have windows 7 professional 64bit OS. whenever i try to open/save as dialog box it appears very slow, then it will say it is not responding then after 10-15sec it will come alive.
    Need help!!!!!!

    Blair,
    I followed your suggestions above....reset IE ...clean boot. Didn't solve the problem.  (had trouble making that MSCONFIG window bigger !? <wink>)
    Problem still exists.  And to be clear, here is the problem(s) ...I believe they are all interrelated.
    #1.  I end the explorer.exe process and restart it.  Run Explorer and start clicking folders in my FAVORITES.  System hangs for about 10 seconds before it catches up.
    Alternatly, after a explorer.exe restart, if I run explorer and start clicking down through folders from the C: drive, there is no hang.   SUSPECT - some sort of file for favorites needs to be rebuilt?!
    #2. Open MS Word.  Type a few letters.  Select File/Save.  Most icons under Favorites are white.  Trying clicking more than one, but system hangs for ten seconds until icons fill in.
    #3.  WINDOWS button, start typing in the search INTERNET....5-10 seconds before Internet Explorer (and other INT* things show up.!  Usually this is instantaneous.
    System Info:
    Great machine and fast for over a year, and now this started FYI.
    OS Name    Microsoft Windows 7 Home Premium
    Version    6.1.7601 Service Pack 1 Build 7601
    Dell System XPS L321X
    x64-based PC
    Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz, 1601 Mhz, 2 Core(s), 4 Logical Processor(s)
    4 gb Ram
    256 SSD
    ACTIONS TAKEN:  (estimated 30 reboots today)
    - Ensure all folders are GENERAL under properties
    - Advanced Attributes - turned off "allow files on this drive to have contents indexed in addition to file properties"
    - Checked Indexed location is C: drive/ User/ just my data areas....reindexed
    - Tried reboot with Windows Search service disabled....no help.  Turned back on.
    - Tried MS Essentials off.  Tried Firewall off
    - Rebuilt ICONCACHE - was 8mb, now less 450kb
    - Archived OUTLOOK down to a reasonable size (and had to do the manual compress to reduce the file size after)
    - turned off some Windows visual effects.
    - Turned off Dropbox from autostarting....this was before I tried the Clean Boot
    - turned by ON (default)  in Startup - though it has Unknown MFG and no details  :~(   , i found that it likely is needed for my 64 bit machine.
    Any help would be appreciated.
    Steve

  • How to force SAVE/OPEN dialog box to appear in IE? (save output locally)

    Hi all!
    I currently have various reports in Excel format outputted in cache via the iAS browser.
    Is there a way to programatically force a SAVE/OPEN BOX to appear in IE whenever my output is spreadsheet/excel? The prompt box appears on Firefox and Opera but not in IE, i take it that IE has already been 'configured' to open excel spreadsheet automatically in the browser.
    Another spin to the question is: How do end users save the Reports output directly to their local machine; instead of having it opened in the browser or saving it in the midtier server

    I found a backdoor solution to this:
    at the URL link, i added &mimetype=application, this will force IE to show the save dialog box because it does not know what the application type is.

  • How to save open files in different projects/workspaces?

    Is it possible at all to have Dreamweaver save different sets of open files in different projects/workspaces like every other IDE out there?
    I can't imagine every web developer is working on ONE project at a time and doesn't feel the need to switch to another one and have his last open files restored from that specific project..
    Am I missing something?

    Very wrong
    I am talking about saving different sessions of open files automatically (and assign them to user-defined projects that may or may not contain several sites or just one site).

  • Freeze during column view in finder and open file box?

    Whenever I open a file and the open file dialog box is in column view it freezes when I click on the file and the view shifts to reveal the icon and info. It happens a lot in finder too, but not as often. It usually doesn't start happening for a few minutes after I reboot.
    I'm pretty sure quicktime is associated with that icon/image preview. I just formatted my hard drive hoping that would help but it doesn't. I have to force quit applications alot if I forget to get out of column view...someone please help!
    I don't remember this happening before I installed macromedia studio 8, but I'm not sure. I have to use those programs.

    see thread http://discussions.apple.com/thread.jspa?messageID=3805971&#3805971
    though no solution yet.

  • How can I stop the Creative Cloud directory 'crashing' when I save/open files to/from any CC app

    I'm running a Mac 10.9, bags of space and memory, no other problems with it.
    I use Creative Cloud and sync to CC using the prescribed CC method. However if I try to open or save a file to the CC directory from within any CC app, the directory opens for a split seconds and then instantly closes preventing me from completing the action. The only way to get files in and out is by dragging and dropping them from the Finder.
    Can anyone tell me how to sort this problem out.
    Thanks

    Hi D2xS-Shooter,
    I am afraid Creative Cloud desktop app is not compatible with Windows Vista. If you run into problems there are very limited resources from Adobe to assist.
    Creative Cloud is a collection of apps with various different tech specs
    http://www.adobe.com/uk/products/creativecloud/tech-specs.html
    Thanks!
    Eshant

  • How to change the prompt message in a open file box

    Hello
    In my VI the user has to introduce several file path. They are sequenced so we know which one is requested. Is there an easy way to change the message on the "choose file to read" window in order to have "choose xxx file to read" etc... Is this through some VB programming or does labview have some tools for that ?

    There are two solutions:
    OBN's solution uses a function to get the file name.
    My solution uses the file control. You have to click on the browse button to select the file.
    Both solutions will open the system Open File dialog where the user can select the file. OBN's solution is more obvous to change the parameters. In my solution you have to use property nodes.
    See the VI (LV7.0) how my solution works.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    Select File.vi ‏15 KB

  • Save/open dialog box doesn't appear

    Hi,
    I have something strange. I can open and edit a project by double clicking on it, also start a new project. But when I want to save or open a project via "save as" of "open project" the dialog box doesn't appear. Saving an existing file trough "ctrl+s" works.
    Things I tried already are:
    - Restart my computer (windows)
    - Clear my AE cache
    - Reinstal AE
    Has anyone has this before? It would be great if it got solved because I can't complete work because of it.
    Tnx & grtz,

    Sorry, here the information that is required:
    Version 11.0.4.2 - CS6
    Installed recent updates: Yes
    OS: Windows 7 Pro (Service pack 1) 64 bit
    Model: HP Z420 Workstation
    Processor: Intel Xeon CPU E5-1620 @3.60Ghz
    Ram: 8Gb
    Has it worked before: yes. It started after I opened a project (trough "open project") because double clicking on this project gives the follwoing error: "The directory name is invalid". Via "Open project" I could open it.
    Do you have any third-party I/O hardware (e.g., AJA, Matrox, Blackmagic, MOTU)? No
    Quicktime 7 pro installed
    Do you have any third-party effects or codecs installed? Yes, Optical Flares & Trapcode. But is unrelated since it isn't a specific project.
    Are you using Render Multiple Frames Simultaneously multiprocessing? Yes
    Are you using the ray-traced 3D renderer? No
    Thanks for the help. If you need any other info, let me know

  • Save/open dialog box for FileWriter

    Hi,
    I have a JSP action link with onclick='onClickExport', defined in an underlying class file.
    The 'onClickExport' method in the class creates a file:
    fileName = "C:\\Temp\\SaveSearchResults.csv";
         File outputFile = new File(fileName);
         FileWriter out = new FileWriter(outputFile);I write results to the file using
    out.write statements and finally close it using out.closeAs you might have noticed the path for the file is hard-coded as C:\Temp, so the file gets written and downloaded there. Can I instead have the open/saveas dialog box pop-up where a user can type filename and select a location for the file to save...? (like content-disposition)
    Can somebody point me how to do that...
    thanks,
    nik

    JFileChooser can't be used with JSP. If invoked in Java on the server side, then the display will be on the server, and presumably, someone is not sitting there waiting for clients to want to save files remotely.
    On the client side, well, there's always applets, but that has nothing to do with JSP. And it would only be able to browser the local client, so a signed applet would be needed.

  • Make Search bar in "Save/Open" dialog box search in filename only

    By default it searches inside files, is there a way to restrict it to filenames?

    Not to start it going, no. But you can change it to name only. Type something, anything, in the Search box. When the search gets started you'll notice you have a new line under the toolbar that has
    Computer Home "SomeFolder" Save +
    With "SomeFolder" probably being either the last folder used in the application, or else the one you have navigated to. Then there is the Save button (although I can't imagine what it would actually be useful for) and the "plus" inside a little circle. Click the + and another line appears, with "Kind: Any"--change to Name in the drop down menu and select which of the usual options you want (Contains, Begins with, etc). BTW, I was just fooling around with it, and discovered that while the Name option works perfectly well, the options for Date Created and Date Modified don't work at all, although Last Opened seems to be OK. Ah well.
    Francine
    Francine
    Schwieder

  • Pop up 'open file' box everytime i open preview

    This is driving me crazy.
    It has an option to open a file from either icloud or my mac. I don't want to open a file. I just want to open preview.
    I would also like to take a screen shot but this pop up box is making it impossible to do.
    Any help please?

  • Is there a way to save a specific set of open files?

    Hi,
    I'm trying to figure out if it's possible to save a specific set of open files in Flash so that when you close the app and then reopen it, you would either see the files that were open when you closed Flash or at least have the option to select it and it woud then open those files in the order that you left them.
    Is that an option by any chance?
    With all my class files open at one time, I hate having to reload them into the order that makes sense to me every time I launch Flash.
    I was looking into the Projects panel which seems like it's in the direction of what I would like but I can't seem to find anwhere that saves open files.
    Thanks in advance for any insight into this!
    Cole

    I don't believe this is possible with Flash - I've used Flash for a long time, and certain learn new things all the time! But Flash only has a "memory" of recently open files, and doesn't automatically open them for you.
    But, for class files, you're in luck. There's a 3rd party AS editor, FlashDevelop, that does EXACTLY that. When you launch it, it auto opens the multiple AS files you ahd open from the previous day/session. FlashDevelop is a wonderful tool to use for editing your AS (and is quicker than Flash, and does custom class introspection, where it auto-completes your own class properties & methods, as well as many other developer-friendly features).
    http://www.flashdevelop.org
    Here is a screen grab of what Flash Develop lloks liek for me when I open it (showing multiple class files opened yesterday, without me having to open them today)

  • Error 6640 InDesign CS3 - Can't open files.

    Hello;
    I can't seem to open, save or export any of my documents due to an Error Code: -6640 that pops up when I click on any of the folders in the 'Open File' box. The message reads:
    "The operation could not be completed. There was a problem with selected file or folder. It might have been moved, renamed, or deleted."
    I'm on Mac OS X 10.5.2. Has anyone encountered this and found a solution to remedy it?
    Thank you.
    Gregg

    Update system to 10.5.4 and InDesign to 5.0.3 to begin with.

Maybe you are looking for

  • RDP Service not listening on 3389 (Win 8.1)

    Here is the setup: Windows 8.1 Pro virtual machine running on Hyper-V. This VM is being configured so we can create a template in MS SysCenter VMM. Networking is configured right and the VM is responding to ping, SMB, etc., but RDP does not work. Aft

  • Connecting iMAC mini to HDMI imput of my monitor

    I have an 22'' Asus monitor with 3 inputs (VGA, DVI and HDMI) and connecting my iMAC mini to DVI input (through HDMI->DVI adapter) all works perfectly. But connecting it directly to HDMI input of my monitor, using HDMI-HDMI cable - the image is very

  • Editing for multiple output formats

    Sorry if this is a stupid question...I'm just getting started with FCE. I'm working on a movie that I want to use in multiple places: - HD version to play directly from computer onto HD display - regular definition DVD - web sized video My source mat

  • Download to MS WORD using OLE

    Hi All, I am developing a program to download data to MS WORD using OLE.  I would like to know answers for my below questions, 1) What is the equivalent ABAP code for VB macro      Selection.Style = ActiveDocument.Styles("No Spacing")      Issue is w

  • Eligibility for Student and Teacher Edition in final year of university

    In Student and Teacher edition FAQ it says that "University and college students-students enrolled at a higher education institution defined as an accredited public or private university or college (including community, junior, or vocational college)