JFileChooser selected file changes when folder chages

Problem with JFileChooser,
The selected filename change when i change the directories, note that standard windows dialog doesnt behave like this .
To reproduce: choose "save to file" in process dialog, enter the file name and then change the directory. The file name disappers from the corresponding box. The dialog must keep the entered file name while changing the folder path
is this a bug ?,
renjith

Hi,
Yes it is!
http://developer.java.sun.com/developer/bugParade/bugs/4357012.html
Regards,
Manfred.

Similar Messages

  • Multiple flash files change when a button click using javascript function

    hi.. am new in flsh...
    i want to multiple flash files change when a button click using a javascript

    <script>
    var count=0;
    function mafunct(newSrc){
        alert("hi");
    var path="a"+count+".swf"; 
    flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';         
        flash+='<PARAM NAME=movie VALUE="'+path+'">';         
        flash+='<PARAM NAME="PLAY" VALUE="false">'; 
        flash+='<PARAM NAME="LOOP" VALUE="false">';
        flash+='<PARAM NAME="QUALITY" VALUE="high">';
        flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
        flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
        flash+='</EMBED>';
        flash+='</OBJECT>';    
    count++;
    alert(path+"aa");
    </script>
    <button onclick="mafunct()">next</button>

  • Script to select files in a folder based on extension

    Does anyone have a script that would select files in a folder based on extension, then move the files somewhere else?

    Hi Kagey and welcome!
    You have to be completely accurate about the path. If your hard disk is called "Macintosh HD", then it's
    every file of folder "Macintosh HD:Applications:FileMaker Pro 6 Folder" whose name extension = "tab"
    You can generalise this for other users if you can't be sure about the name of their hard disk:
    set apps_folder to path to applications folder as string
    set fmp_folder to apps_folder & "FileMaker Pro 6 Folder"
    tell application "finder" to get every file of folder fmp_folder whose name extension = "tab"
    HTH
    H
    PS - well done in the footy

  • JFileChooser selected file

    from my code below, the File Name in the dialog/file selection window defaults to the file but once I click on to a directory to change directory the File Name changed to the directory name. How do I set the filechooser to not change the File Name if a directory is clicked? Thanks, jude
    File fileSelected = new File("c:\\temp\\newfile.txt");
    JFileChooser filechooser = new JFileChooser();
    filechooser.setDialogTitle("Save to a text file.");
    filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    filechooser.setSelectedFile(fileSelected);
    int iStatus = filechooser.showOpenDialog(null);
    if (iStatus == JFileChooser.APPROVE_OPTION) {
         fileSelected = filechooser.getSelectedFile();
    else if (iStatus == JFileChooser.CANCEL_OPTION) {
         return;
    ...

    I have been able to get the JFileChooser to behave in a more standard way when the user uses the mouse to select files. I have still not been able to find a way to get it to work the way I want if they've typed a file in manually. Does anyone know how to get to the JTextField in the JFileChooser to read the value?
    If anyone could hook me up with how to access the JTextField I'd sure be greatful!!!
    Here is how I 'fixed' the traversal of folders using the mouse.
    I subclassed the JFileChooser and made a local variable
    private File lastSelectedFile = null;
    I then registered property changed listeners in the constructor for both file selection and directory changes:
    this.addPropertyChangeListener(JFileChooser.DIRECTORY_CHANGED_PROPERTY,
    (new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent e) {
    processDirChanged(e);
    this.addPropertyChangeListener(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY,
    (new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent e) {
    processFileSelected(e);
    Here are the propertyChangedListeners:
    public void processDirChanged(PropertyChangeEvent e) {
    if ( lastSelectedFile != null ) {
    File newSelectedFile = new File(this.getCurrentDirectory().getPath() + File.separator + this.lastSelectedFile.getName());
    this.lastSelectedFile = newSelectedFile;
    this.setSelectedFile(this.lastSelectedFile);
    public void processFileSelected(PropertyChangeEvent e) {
    File selectedFile = this.getSelectedFile();
    if ( lastSelectedFile != null && ( selectedFile == null || selectedFile.isDirectory()) ) {
    this.setSelectedFile(this.lastSelectedFile);
    else {
    lastSelectedFile = this.getSelectedFile();
    }

  • Font style of pdf files changes when it is opened with adobe reader 10.1.2 version

    The font style of pdf files changes if opened with adobe reader 10.1.2 version.
    Plz suggest wht to do....
    Following is the screenshot from adobe reader
    view: 75 % zoom in adobe reader (issue)
    view: 75 % zoom in foxit reader (no issue)
    Thanks,
    Neha

    Hi,
    Can you please share the PDF with which you are seeing this issue.
    You can mail me the PDF to e-mail that i have specified in the private message send to you.

  • Azure Website restarts due to file change when no file has been changed

    Hello,
    I have a paid subscription site running at LMFitInc.azurewebsites.net. The site seems to randomly restart throughout the day with no obvious reason. Logs (below) indicate that this is in response to a file change though I'm not changing any files & can't
    find anything changed searching by date. 
    Any thoughts?
    <Event>
    <System>
    <Provider Name=".NET Runtime"/>
    <EventID>0</EventID>
    <Level>0</Level>
    <Task>0</Task>
    <Keywords>Keywords</Keywords>
    <TimeCreated SystemTime="2015-04-01T01:25:13Z"/>
    <EventRecordID>276896843</EventRecordID>
    <Channel>Application</Channel>
    <Computer>RD0003FF453E2C</Computer>
    <Security/>
    </System>
    <EventData>
    <Data>
    _shutDownMessage=CONFIG change HostingEnvironment initiated shutdown Change Notification for critical directories. File Change Notification Error in App_Browsers Change Notification for critical directories. File Change Notification Error
    in App_Code Change Notification for critical directories. File Change Notification Error in App_WebReferences Change Notification for critical directories. File Change Notification Error in App_GlobalResources Change Notification for critical directories.
    File Change Notification Error in bin Directory rename change notification for 'D:\home\site\wwwroot'. File Change Notification Error in wwwroot HostingEnvironment caused shutdown _shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    at System.Environment.get_StackTrace() at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal() at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand() at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace) at System.Web.Configuration.HttpConfigurationSystem.OnConfigurationChanged(Object
    sender, InternalConfigEventArgs e) at System.Configuration.Internal.InternalConfigRoot.OnConfigChanged(InternalConfigEventArgs e) at System.Configuration.BaseConfigurationRecord.OnStreamChanged(String streamname) at System.Web.Configuration.WebConfigurationHostFileChange.OnFileChanged(Object
    sender, FileChangeEvent e) at System.Web.DirectoryMonitor.FireNotifications() at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback) at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object
    state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback,
    Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
    </Data>
    </EventData>
    </Event>
    Thanks,
    Geoff

    Thanks Aram, I agree that it looks like a full deployment, however I'm sure I'm not deploying anything. I also filtered the files by date to look for anything that might be changing without my knowledge but came up dry. 
    I'm in the process of setting this up on a VM where I've got full IIS access with the hope of getting more information. 
    Geoff

  • Colors in pdf files changed when I open those files in the iPad.

    I usually use iPad and Goodreader for reading journal articles.
    There is one big problem reading the papers using iPad because colors in pdf files looks abnormal.
    When I use my labtop and desktop, I can see whole colors in the pdf files, so I can see what is exactly happening in the images in pdf files.
    However, I cannot catch any details from those images in pdf files when I use my iPad.
    For example, some colors in the pdf files disappeared and whole images in the pdf files looks too dark.
    I searched for some informations to solve this problem using google but I cannot find exact method.
    Many people said about this problem for a long time (maybe three years ago?) but it has not been solved yet.
    Can anyone suggest me how to solve this problem?
    If this issue cannot be solved, I think I do not have any reasons for using my iPad.

    You've just uncovered something I don't really know.  I had naively thought the Central Database and Cache are one and the same (and that the [ Purge Cache ] button would clear saved settings), but now I'm not so sure. 
    I tested by changing the parameters of a raw file, and I didn't see any files inside the Cache folder change their modification dates, which is not at all what I expected.
    I don't really want to press the [ Purge Cache ] button to check it here, because I want to retain my own settings.  You could try it and see if it clears the white balance setting on a particular file.
    -Noel

  • PSE8/Vista: Can I do a mass smart-fix on all/selected files in a folder?

    I'm running PSE8 under Vista Home Premium.
    I would like to transmit many files to a print shop (Walgreens, Ritz, etc.) but they do not offer the ability to automatically enhance (smart-fix) each file, so I have to do it at home before transmission.
    Is there a [simple] procedure that would smart-fix a bunch of photos in one fell swoop rather than individually?

    Barb,
    In another thread, PS.com Mark says,
    "You can apply Auto Smart Fix to multiple photos from the Organizer; control-click the photos to multi select, and choose the Edit > Auto Smart Fix (control Alt M) menu command; the program will rip through them, one at a time, until they are all done."
    Comment?

  • Password file gets changed when an account is locked/unlocked in 9i !!

    Hello All,
    I observed that in 9i (9.2.0.8 and 9.2.0.6 on Solaris 9), the timestamp of the orapw<SID> file changes when a non-sys account is LOCKED/UNLOCKED. There is no change in the size of the file, but timestamp alone gets changed to the time the account is locked/unlocked.
    orapwd<sid> stores the password for administrative accounts, what has it got to do with non-sys accounts( an account with just create session privs ) ?
    Is it the expected behaviour ?
    TIA,
    John

    Hi,
    You can create a user defined metric which will query the table "dba_users" and check for "account_status" and will alert you whenvr usr is locked.
    You can find the link for creating "user defined metric" at "Related Links" section at the bottom of database homepage in OEM.
    Hope this helps...

  • Move selected files into a new folder

    here's what I'd like to do:
    -- select a number of files in the Finder
    -- run the script
    -- get a prompt for a new folder name and location
    -- move (not copy) the selected files into this folder
    Sounds possible but so far eludes me. Any help please?

    Thanks, that helped a lot.
    I played some more with this and made a more simplified script that uses the finder for naming of the new folder and then renaming it.
    tell application “Finder”
    set the_folder to container of item 1 of (get selection) as alias
    end tell
    tell application “Finder”
    set new_folder to (make new folder in folder the_folder)
    move selection to new_folder
    end tell
    tell application “Finder”
    select new_folder
    end tell
    tell application “System Events”
    keystroke return
    end tell
    15" 1.67ghz PB, 20" 2ghz G5 iMac   Mac OS X (10.4.6)  

  • Finder jumping to previously selected file - iMac 10.6.8

    I am having the frustrating problem on my IMac running 10.6.8 that the finder is jumping to previously selected file whenever I expand a new folder. So, if I select file A in Folder A, then scroll down and expand Folder B, the Finder automatically jumps back up to file A at the top of the screen. Sometimes I don't even have to open a new folder, if I just scroll down the list of files/folders, it will sometimes jump back up to the selected file. Is this a bug? A setting? It wastes a lot of time as I have to keep going back to where I was in the finder window...
    I have searched this on this forum and on Google and nobody seems to have any answers. I would hope that Apple would fix this bug in an update if it is indeed a bug, or, if it is a setting, where can I change it?
    Thanks for any help!

    The white iMacs from 2006 can only be upgraded as high as 10.7 which is Lion, not Mountain Lion. RAW files work fine on my 2006 white iMac with Lion so upgraded to 10.7 and then try out RAW images before you purchase a new machine. On a side note, I found the white iMacs quite slow (what with their age) and so I installed an SSD drive. Well worth the money! Impressively quick for an older machine.

  • Suddenly I cannot select just one file in a folder, all of them get selected at the same time.  Happens in Lightroom also when scrolling through the filmstrip. what did I do?

    My Mac Pro is acting wonky all of a sudden. This all began after someone in my family spilled water on the keyboard and tried to clean it up while still turned on. I bought a new keyboard but now I cannot select just one file in a folder, all get selected. Same thing happens in Lightroom 3 when editing in the filmstrip mode, I cannot just select one photo, they all get selected. Plus, after awhile I cannot type in small letters either, just capitals. If I restart it is ok for about 15 minutes then the problems start. I did a reinstall of the OS but it is still happening. I zapped the pram, fixed permissions, etc but no luck. I am on a 2x2.4 GHz Quad-Core Intel Xeon machine with 900 gigs unused. Any suggestions? 

    Try also resetting smc.
    Also check your keyboard preferences.  And just to possibly reset some keyboard related caches and prefs you might go through the "Change Keyboard Type..." (Keyboard tab in the Keyboard preferences).

  • JFileChooser's approve button text changes when file

    I have a JFileChooser used for loading some XML file(s). We want the approve button's text to be "Load". When I bring up the dialog, the button text initially reads "Load", when I select a directory, it reads "Open", if I select a file again, it goes back to "Load". So far, so good.
    The problem comes when using it in a non-English language. When I bring up the dialog, the button text initially reads the appropriately translated "Load". However, when I select a directory, it changes to the English "Open". I do not see a method to use to adjust this text. Am I missing something, or is this a bug?
    Any help is greatly appreciated.
    Jamie

    Here's some code I'll put into the public domain:
    package com.graphbuilder.desktop;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Stack;
    import java.util.Vector;
    import java.util.StringTokenizer;
    import java.io.File;
    <p>Attempt to improve the behaviour of the JFileChooser.  Anyone who has used the
    the JFileChooser will probably remember that it lacks several useful features.
    The following features have been added:
    <ul>
    <li>Double click to choose a file</li>
    <li>Enter key to choose a file after typing the filename</li>
    <li>Enter key to change to a different directory after typing the filename</li>
    <li>Automatic rescanning of directories</li>
    <li>A getSelectedFiles method that returns the correct selected files</li>
    <li>Escape key cancels the dialog</li>
    <li>Access to common GUI components, such as the OK and Cancel buttons</li>
    <li>Removal of the useless Update and Help buttons in Motif L&F</li>
    </ul>
    <p>There are a lot more features that could be added to make the JFileChooser more
    user friendly.  For example, a drop-down combo-box as the user is typing the name of
    the file, a list of currently visited directories, user specified file filtering, etc.
    <p>The look and feels supported are Metal, Window and Motif.  Each look and feel
    puts the OK and Cancel buttons in different locations and unfortunately the JFileChooser
    doesn't provide direct access to them.  Thus, for each look-and-feel the buttons must
    be found.
    <p>The following are known issues:  Rescanning doesn't work when in Motif L&F.  Some
    L&Fs have components that don't become available until the user clicks a button.  For
    example, the Metal L&F has a JTable but only when viewing in details mode.  The double
    click to choose a file does not work in details mode.  There are probably more unknown
    issues, but the changes made so far should make the JFileChooser easier to use.
    public class FileChooserFixer implements ActionListener, KeyListener, MouseListener, Runnable {
         Had to make new buttons because when the original buttons are clicked
         they revert back to the original label text.  I.e. some programmer decided
         it would be a good idea to set the button text during an actionPerformed
         method.
         private JFileChooser fileChooser = null;
         private JButton okButton = new JButton("OK");
         private JButton cancelButton = new JButton("Cancel");
         private JList fileList = null;
         private JTextField filenameTextField = null;
         private ActionListener actionListener = null;
         private long rescanTime = 20000;
         public FileChooserFixer(JFileChooser fc, ActionListener a) {
              fileChooser = fc;
              actionListener = a;
              fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
              okButton.setMnemonic('O');
              cancelButton.setMnemonic('C');
              JButton oldOKButton = null;
              JButton oldCancelButton = null;
              JTextField[] textField = getTextFields(fc);
              JButton[] button = getButtons(fc);
              JList[] list = getLists(fc);
              String laf = javax.swing.UIManager.getLookAndFeel().getClass().getName();
              if (laf.equals("javax.swing.plaf.metal.MetalLookAndFeel")) {
                   oldOKButton = button[0];
                   oldCancelButton = button[1];
                   filenameTextField = textField[0];
                   fileList = list[0];
              else if (laf.equals("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) {
                   oldOKButton = button[0];
                   oldCancelButton = button[1];
                   filenameTextField = textField[0];
                   fileList = list[0];
              else if (laf.equals("com.sun.java.swing.plaf.motif.MotifLookAndFeel")) {
                   oldOKButton = button[0];
                   oldCancelButton = button[2];
                   button[1].setVisible(false); // hides the do-nothing 'Update' button
                   button[3].setVisible(false); // hides the disabled 'Help' button
                   filenameTextField = textField[1];
                   fileList = list[0];
              fix(oldOKButton, okButton);
              fix(oldCancelButton, cancelButton);
              okButton.addActionListener(this);
              cancelButton.addActionListener(this);
              fileList.addMouseListener(this);
              addKeyListeners(fileChooser);
              new Thread(this).start(); // note: rescanning in Motif feel doesn't work
         public void run() {
              try {
                   while (true) {
                        Thread.sleep(rescanTime);
                        Window w = SwingUtilities.windowForComponent(fileChooser);
                        if (w != null && w.isVisible())
                             fileChooser.rescanCurrentDirectory();
              } catch (Throwable err) {}
         public long getRescanTime() {
              return rescanTime;
         public void setRescanTime(long t) {
              if (t < 200)
                   throw new IllegalArgumentException("Rescan time >= 200 required.");
              rescanTime = t;
         private void addKeyListeners(Container c) {
              for (int i = 0; i < c.getComponentCount(); i++) {
                   Component d = c.getComponent(i);
                   if (d instanceof Container)
                        addKeyListeners((Container) d);
                   d.addKeyListener(this);
         private static void fix(JButton oldButton, JButton newButton) {
              int index = getIndex(oldButton);
              Container c = oldButton.getParent();
              c.remove(index);
              c.add(newButton, index);
              newButton.setPreferredSize(oldButton.getPreferredSize());
              newButton.setMinimumSize(oldButton.getMinimumSize());
              newButton.setMaximumSize(oldButton.getMaximumSize());
         private static int getIndex(Component c) {
              Container p = c.getParent();
              for (int i = 0; i < p.getComponentCount(); i++) {
                   if (p.getComponent(i) == c)
                        return i;
              return -1;
         public JButton getOKButton() {
              return okButton;
         public JButton getCancelButton() {
              return cancelButton;
         public JList getFileList() {
              return fileList;
         public JTextField getFilenameTextField() {
              return     filenameTextField;
         public JFileChooser getFileChooser() {
              return fileChooser;
         protected JButton[] getButtons(JFileChooser fc) {
              Vector v = new Vector();
              Stack s = new Stack();
              s.push(fc);
              while (!s.isEmpty()) {
                   Component c = (Component) s.pop();
                   if (c instanceof Container) {
                        Container d = (Container) c;
                        for (int i = 0; i < d.getComponentCount(); i++) {
                             if (d.getComponent(i) instanceof JButton)
                                  v.add(d.getComponent(i));
                             else
                                  s.push(d.getComponent(i));
              JButton[] arr = new JButton[v.size()];
              for (int i = 0; i < arr.length; i++)
                   arr[i] = (JButton) v.get(i);
              return arr;
         protected JTextField[] getTextFields(JFileChooser fc) {
              Vector v = new Vector();
              Stack s = new Stack();
              s.push(fc);
              while (!s.isEmpty()) {
                   Component c = (Component) s.pop();
                   if (c instanceof Container) {
                        Container d = (Container) c;
                        for (int i = 0; i < d.getComponentCount(); i++) {
                             if (d.getComponent(i) instanceof JTextField)
                                  v.add(d.getComponent(i));
                             else
                                  s.push(d.getComponent(i));
              JTextField[] arr = new JTextField[v.size()];
              for (int i = 0; i < arr.length; i++)
                   arr[i] = (JTextField) v.get(i);
              return arr;
         protected JList[] getLists(JFileChooser fc) {
              Vector v = new Vector();
              Stack s = new Stack();
              s.push(fc);
              while (!s.isEmpty()) {
                   Component c = (Component) s.pop();
                   if (c instanceof Container) {
                        Container d = (Container) c;
                        for (int i = 0; i < d.getComponentCount(); i++) {
                             if (d.getComponent(i) instanceof JList)
                                  v.add(d.getComponent(i));
                             else
                                  s.push(d.getComponent(i));
              JList[] arr = new JList[v.size()];
              for (int i = 0; i < arr.length; i++)
                   arr[i] = (JList) v.get(i);
              return arr;
         public File[] getSelectedFiles() {
              File[] f = fileChooser.getSelectedFiles();
              if (f.length == 0) {
                   File file = fileChooser.getSelectedFile();
                   if (file != null)
                        f = new File[] { file };
              return f;
         public void mousePressed(MouseEvent evt) {
              Object src = evt.getSource();
              if (src == fileList) {
                   if (evt.getModifiers() != InputEvent.BUTTON1_MASK) return;
                   int index = fileList.locationToIndex(evt.getPoint());
                   if (index < 0) return;
                   fileList.setSelectedIndex(index);
                   File[] arr = getSelectedFiles();
                   if (evt.getClickCount() == 2 && arr.length == 1 && arr[0].isFile())
                        actionPerformed(new ActionEvent(okButton, 0, okButton.getActionCommand()));
         public void mouseReleased(MouseEvent evt) {}
         public void mouseClicked(MouseEvent evt) {}
         public void mouseEntered(MouseEvent evt) {}
         public void mouseExited(MouseEvent evt) {}
         public void keyPressed(KeyEvent evt) {
              Object src = evt.getSource();
              int code = evt.getKeyCode();
              if (code == KeyEvent.VK_ESCAPE)
                   actionPerformed(new ActionEvent(cancelButton, 0, cancelButton.getActionCommand()));
              if (src == filenameTextField) {
                   if (code != KeyEvent.VK_ENTER) return;
                   fileList.getSelectionModel().clearSelection();
                   actionPerformed(new ActionEvent(okButton, 0, "enter"));
         public void keyReleased(KeyEvent evt) {}
         public void keyTyped(KeyEvent evt) {}
         public void actionPerformed(ActionEvent evt) {
              Object src = evt.getSource();
              if (src == cancelButton) {
                   if (actionListener != null)
                        actionListener.actionPerformed(evt);
              else if (src == okButton) {
                   File[] selectedFiles = getSelectedFiles();
                   Object obj = fileList.getSelectedValue(); // is null when no file is selected in the JList
                   String text = filenameTextField.getText().trim();
                   if (text.length() > 0 && (obj == null || selectedFiles.length == 0)) {
                        File d = fileChooser.getCurrentDirectory();
                        Vector vec = new Vector();
                        StringTokenizer st = new StringTokenizer(text, "\"");
                        while (st.hasMoreTokens()) {
                             String s = st.nextToken().trim();
                             if (s.length() == 0) continue;
                             File a = new File(s);
                             if (a.isAbsolute())
                                  vec.add(a);
                             else
                                  vec.add(new File(d, s));
                        File[] arr = new File[vec.size()];
                        for (int i = 0; i < arr.length; i++)
                             arr[i] = (File) vec.get(i);
                        selectedFiles = arr;
                   if (selectedFiles.length == 0) {
                        Toolkit.getDefaultToolkit().beep();
                        return;
                   if (selectedFiles.length == 1) {
                        File f = selectedFiles[0];
                        if (f.exists() && f.isDirectory() && text.length() > 0 && evt.getActionCommand().equals("enter")) {
                             fileChooser.setCurrentDirectory(f);
                             filenameTextField.setText("");
                             filenameTextField.requestFocus();
                             return;
                   boolean filesOnly = (fileChooser.getFileSelectionMode() == JFileChooser.FILES_ONLY);
                   boolean dirsOnly = (fileChooser.getFileSelectionMode() == JFileChooser.DIRECTORIES_ONLY);
                   if (filesOnly || dirsOnly) {
                        for (int i = 0; i < selectedFiles.length; i++) {
                             File f = selectedFiles;
                             if (filesOnly && f.isDirectory() || dirsOnly && f.isFile()) {
                                  Toolkit.getDefaultToolkit().beep();
                                  return;
                   fileChooser.setSelectedFiles(selectedFiles);
                   if (actionListener != null)
                        actionListener.actionPerformed(evt);

  • When I select files to archive, they move from my file folder, but then I go to the archive folder and it says Empty? Where are those files?

    When I select files to archive, they move from my file folder, but then I go to the archive folder and it says Empty? Where are those files?

    Your account names are probably different on the two Macs. If you know the UNIX command line, open a terminal window and run:
    $ id 
    You should see a line that starts with something like this:
    uid=501(your_user_id_here)
    now check the owner of the folder you copied over:
    $ ls -ld Music
    drwx------+ 8 some_user_id_here  staff  272 May 14 16:08 Music
    Do the IDs match? If not, you could change the ownership. Say your id is "johnsmith"
    $ chown -R johnsmith Music
    Now try and access it with iTunes.

  • I purchased the Adobe pdf Pack to combine 50 PDF files to one and when I select them from my folder it claims "the files are not in a format not supported for conversion to PDF".  They already are pdfs, what am I doing wrong?".

    I purchased the Adobe pdf Pack to combine 50 PDF files to one and when I select them from my folder it claims "the files are not in a format supported for conversion to PDF".  They already are pdfs, what am I doing wrong?

    Moved to Adobe PDF Pack (read only)

Maybe you are looking for