JFileChooser, how can you allow the user to select MORE than 1 file?

Hello everyone.
I want to allow the user to select multiple files from a directory, not just 1, but not just the whole directory.
Currently I see these 2 options from looking at the sun's JFileChooser demo:
//Create a file chooser
        fc = new JFileChooser();
        //Uncomment one of the following lines to try a different
        //file selection mode.  The first allows just directories
        //to be selected (and, at least in the Java look and feel,
        //shown).  The second allows both files and directories
        //to be selected.  If you leave these lines commented out,
        //then the default mode (FILES_ONLY) will be used.
        //fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);but both don't allow the selection of more than 1 file.
When I say, select more than 1 file I mean the user can hold in SHIFT or CTRL and select files.
Any ideas how to do this?
Thanks!

http://java.sun.com/javase/6/docs/api/javax/swing/JFileChooser.html#setMultiSelectionEnabled(boolean)
Cheers,
Laird

Similar Messages

  • How can i restrict a user not open more than 3 sessions in database

    how can i restrict a user not open more than 3 sessions in database.For this i have already create a profile and set CONCURRENT_SESSIONS=3 and assing that profile to user but the problem is there.

    You will simply need to use the following parameter in your CREATE PROFILE syntax.
    CREATE PROFILE normal_user
    LIMIT SESSIONS_PER_USER 2;
    but the resource limits set for a profile are enforced only when you enable resource limitation for the associated database.
    you could do this either by having an initialization paramater which will invoke as soon as the database starts or try using ALTER SYSTEM command

  • HT1539 Can you download the digital copy to more than one iTunes account?

    Can you download the digital copy to more than one iTunes account?

    No. The redemption codes are one-time use only.
    tt2

  • How can I allow the user to pause the audio of a slide (and restart it) before continuing on to the

    Most of my slides have a combination of test/graphics and voiceover.  I would like to allow the user to pause, resume, and replay the audio of each slide.  I know, as a learner, I sometimes need to go back and hear something again -- or pause until a distraction has passed.
    How can I tie audio to a playbar or set of buttons?  I know if it's video, it can be done.  How do I give them control of the audio? 
    I am in Captivate 7.  My files are .mp3 files.
    Thanks - TL

    You cannot add extra buttons to the playbar but you could add a Replay button to the slide and have this button execute a Standard Advanced action with a Jump to Slide action that points to the same slide you are currently on.  This should effectively jump your user back to the beginning of the same slide.

  • How can I allow the user to retake a quiz from the middle of it in Captivate 7?

    Hello Captivaters,
    I would like to force the learner to pass a quiz before he can continue on with the training.  If he doesn't pass the quiz, he will need to go back and take it again. The "retake" button allows him to do this, but I will actually like to have 4-5 of these "quiz checkpoints" in the eLearning -- each separated with presentation material --  so that the user proves he understands the material before advancing. 
    Therefore I would like to create my own "retake" button at the end of every "quiz checkpoint" that takes the learner back to the first question of that checkpoint (not to the first question in the training).  So far, I have been able to create a button that appears after he gets a certain amount correct to allow him to continue, and I want to create a button that appears that takes him back to the first question in the checkpoint if does not get the required amount correct and retake those questions.  The first part is easy, but I also need to add the function or reassign some variable to allow the user to retake the quiz. I hope I am making sense.. Any help would be much appreciated!
    - Ryan

    It's great!  Thanks again.
    Here is the issue now.  I guess it's not a huge problem, it's just if I can't find a better way, what I need to do will take a lot of time.
    Like I mentioned before, I created this "results" slide that on enter either shows a "congrats" button or a "retry" button, depending on whether or not the user passed the quiz.  I have copied this slide and pasted it behind all of the other sub-quizzes in the training, but when I do that, of course the link between the buttons and the conditional advanced action break.
    As you know, when you duplicate a slide, all of the names of the objects on that slide are "refreshed" and are replaced with new generic names because you are in fact creating new objects as well.  This means that I need to rename all of the objects on that slide (even though its a duplicate) and then replace all of the "old names" in the advanced action with these new object names..   Is there a faster way to do that?
    Thanks again!!
    Ryan

  • How do I allow the user to select and resize the CNiGraph while executing?

    I am writing an application with Measurement Studio and Visual C++ that will allow the user to create graphs on the fly. I need to give them the capability to select a graph and resize it in a manner consistent with most other Windows programs (i.e. resize handles). I have tried various implementations of the CRectTracker class and can get it to work for Microsoft controls, but I can not get it to work with the CNiGraph (the only one I have tried so far). The code runs but I never get the selection box or handles around the control. Is there a way to do this and is there an example anywhere that I can go from? Any help would be appreciated.

    Never mind. I have now found the way to do this.

  • Can you ask the user to select a point?

    Is there a way in a javasript to ask the user to select a point and then get that information back as an X and Y value?
    Eric

    One way, if you have cs4, is have the user drop a color sampler. Then you could do something like this
    app.activeDocument.colorSamplers[0].position;// get the position
    app.activeDocument.colorSamplers[0].remove()// remove the sample

  • How can i prevent a user to login more than once at the same time ?

    Supose there are a user , D .
    and i am using thread and socket in the application.
    once a user logined in , it will open a new socket .
    Well , but D is trying to login twice at the same time ... and my thread is opening two socket for him .... , how can i prevent that ?
    *thanks for help and sorry for my poor english                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Thanks for reply
    ya ~ i've got a solution ~
    actually i am doing a server for mobile phone to get data. Sometime 1 single ID will send twice a message (usually nokXX mobile phones) .. i use milli sec to check those message ....
    n it seems working ....

  • How can you send an email out to more than 65 persons at a time?

    I have an email notification list of 175 persons who regularly get communications from me. I have recently discovered that only 65 of them are getting these emails. How can I send to my entire list?
    Thanks!

    Is the list stored on a server or in Thunderbird?
    I'm not aware of a limit to the number of recipients of a message in Thunderbird when you use a list. A limit may be imposed by your service provider as an anti-spam measure. You may want to search around to learn more about any limits there.

  • How can you access the content behind an Animate .oam file in Muse?

    I have an animation to open doors at the bottom of a parallax scroll, but once the doors open, I cannot click on any of the buttons in my "room" that were set up in Muse. Anyone have any ideas of how to fix this? I am using CC for both programs.
    par·al·lax: The effect whereby the position or direction of an object appears to differ when viewed from different positions, e.g., through the viewfinder and the lens of a camera
    More »

    Hello,
    In case .oam file is placed above the content, then I am afraid user would not be able to click on the content which is behind the animation.
    There are two workarounds that you have. Either have the content (Buttons behind the open door) placed inside the Animation itself so that users can click on it.
    Or you can have transparent Rectangles (boxes) placed in front of the animation and apply links to them. it should appear like the buttons behind the animation are clickable however it should be these transparent Boxes which would be clickable and are placed above the Buttons and the animation (on the top layer).
    Hope this helps.
    Regards,
    Sachin

  • How can I use the RMS.vi over more than one period?

    Hi everyone,
    I am using the Cycle average and RMS.VI to get the RMS value of a alternative voltage (2kHz). To acquire this signal I am using a differentiel AI of a 6225 card (at 250kS/s) and the RMS value is correct, it works fine. However from what I have understood, this VI calculates the RMS value according to only one period no matter how many samples I have acquired (2000 samples in the VI I have attached). Is this correct? If so, is ithere a way to use it over all of the 2000 samples to get a more averaged value? Or does another VI exist?
    I could repeat several time an acquisition of a short number of samples (a period) and make an average but it would take some time and I have to do this with 39 other Inputs on the same card one after the other...
    Thank you for your help,
    User
    Attachments:
    Forum.vi ‏76 KB

    User_1979 wrote:
    ....could you tell me if this VI sends a rms value of X compleat periods (even if I have send X periods and a half for example)?
    It gives the RMS value of only the newest set of data.
    The RMS and RMS Pt. By Pt. work for me, but it depends on how you break out that Dynamic Data from the Express VI, which was why I suggested you didn't use it - mainly because you can't tell what happens to that data when you wire it to a function and it coerces. Actually, I should say, I can't tell what happens to it. You may know, but I don't.  
    In the attached screenshot, I have "made" a 2k sine wave with an amplitude of 5. The indicators show RMS value.
    Richard
    Attachments:
    rms.gif ‏14 KB

  • Can you sync the apple watch to more than one phone?

    Say I wanted to leave my phone at home.  Could I sync my apple watch to my husbands phone but still get my texts etc???

    If you're within about 20-30 feet, sync will be via Bluetooth. If the phone is on a wifi network, you can be farther away: exactly how far varies according to the quality of wifi, walls etc.

  • How can I allow a user (client) to choose a local image file (on his hard d

    How can I allow a user (client) to choose a local image file (on his hard drive) and modify it using an applet from his browser ? I am trying to develop a web page that enables the user to choose an Image file, manipulate the image using a java applet, and display the results.
    Using Java�s �JFileChooser� does not work when called from a browser, probably due to security privileges issues. On the other hand, I can choose and upload any file using a JavaScript form:
    <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="process.asp">
    <INPUT TYPE=FILE NAME="file1"><BR>

    It seems that I can choose an image file with a Java script form and process an image with an applet. How can I choose a file AND process it locally ?
    (I do not wish to upload the file to the server using JavaScript form and then back to the client�s applet for processing since it will be a tremendous waste of resources).
    Will appreciate any solution.
    Thanks !
    ( my email is: [email protected] )

    "Using Java�s �JFileChooser� does not work when called from a browser, probably due to security privileges issues. "
    You can do this if you sign the applet...

  • How can I allow other users on my macbook to view my iphoto library when th

    How can I allow other users on my macbook to view my iphoto library when they are logged in. I do not have a network, and the users (my family) all log in seperately when they use the computer. Does anyone know? Thank you.

    rdoss
    Welcome to the Apple Discussions.
    If you want others to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account(s). In the other account(s), enable 'Look For Shared Libraries'. Your Library will appear in their source pane.
    Remember iPhoto must be running in both accounts for this to work.
    Regards
    TD

  • How can you shrink the size of an upright picture to make it smaller without losing any of the detail in it??? At the moment, if I view them on my laptop, landscape photos fill the screen, but portrait photos only show the middle part.

    How can you shrink the size of an upright picture to make it smaller without losing any of the detail in it (in Slideshow)??? At the moment, if I view them on my Mac Laptop, landscape photos fill the screen, but portrait photos only show the middle part, so I loose the top and bottom of the picture.  Have tried cropping, but that means I lose top and bottom part of the picture, so that is not the answer!!

    Homestly haven't a clue what's going on there. 
    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder.
    (On 10.7: Hold the option (or alt) key while clicking on the Go menu in Finder to access the User Library)
    (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.

Maybe you are looking for

  • How can I add new value in a list box in a screen

    Hi All ,     In transaction CRMD_BUS2000120 (CRM Server), I need to add one value to the list box. Already 4 values are coming. How can I add 1 more value.   any suggestion is very appreciated. Thanks & Regards,   Shekar.

  • HT5557 How do i get it to play a book?

    I cant get my ibook to play a book I know not all books play but the one I have said it had it

  • Change default block size on tftp server

    Is there a way to change the default block size on the tftp server so that it defaults to 1024 instead of 512 I am aware that the client can accomplish this by: tftp> tsize tftp> blkzise 1024 but I don't want the client to have to enter these additio

  • Install Schema-BIP

    Dear All, How to install schema manually in Schedular Configuration tables. BIP-->Admin-->System Maintenance-->Scheduler Configuration When i click install schema it automatically run the DDL script in particular schema. But my requirment is i need t

  • From PC to Mac

    I've had my 5th Generation iPod for almost a year now, and have it formatted to my PC. Recently I picked up a mac and would like to start using my ipod with it. If I plug my iPod into my Mac, will my music be lost because of a change of format? Thank