JFileChooser doesn't cancel out of File Open

I am using JFileChooser and an ActionListener for it, which checks for either
jFileChooser.getDialogType() == ACJFileChooser.OPEN_DIALOG
or
jFileChooser.getDialogType() == JFileChooser.SAVE_DIALOG.
It opens and saves files just fine. However if I choose a file name in the Open window and say Cancel, it still opens the file, because
jFileChooser.getDialogType() == ACJFileChooser.OPEN_DIALOG
is true.
How can I see that I said Cancel?
Thanks in advance for your help!

BrigitAnanya wrote:
Ok, so you suggest to use showOpenDialog and showSaveDialog? Well, these methods have a parent argument, so how can I find the parent of my JFileChooser?What is calling the JFileChooser? That should be the parent.
And if getDialogType is meaningless, why was I able to open and save files?You are having quite a few problems right now, are you not? It's because you are using this.
Where can I find the turorial and api?OMG, are you serious? You don't have a link to the tutorials and the api? You are forbidden to ask any further questions until you find the tutorials and api and bookmark them. Once you've found them, searching them is trivial.

Similar Messages

  • PSE9 Constant Crashes on File Open

    I am trying to edit approximately 250 Nikon NEF files and PSE9 crashes almost constantly.  I can try to open a file and PSE9 will just close.  Other times I can open a few files in the raw converter, one at a time, canceling out each file, and after 4 or 5 files PSE9 will just close.  Other times when I open a file, I get a "white screen of death"  and a message that PSE9 has stopped working.
    I am running a quad core intel processor, 8 Gigs RAM, Vista w/the latest service packs.  No other programs are running.
    I need to get this project done and will never finish it at this rate.  Any suggestions would be appreciated.

    Hi,
    The only other suggestion I could make, is to make sure you have the most upto date RAW import plugin. This can either be done via update in PSE9 or download it from adobe
    http://kb2.adobe.com/cps/883/cpsid_88395.html
    The other thing you could always try is converting them to DNG which is the same as RAW in the fact it doe not process the image but is an open format. Adobe provide a free DNG converter on their site.
    http://www.adobe.com/support/downloads/product.jsp?product=106&platform=Windows&promoid=HT ENB
    I only have 3gig on win 7 and can open more then 20 photos in the RAW editor with PSE9 before opening them in PSE9 for full editing.
    Sorry could not be of any further help.
    Thanks
    MardyMarvin

  • Opening file also opens "File Open" dialog

    I have recently noticed a changed behaviour in my Mac OS X Mountain Lion. Every time I double click a file to open it (Excel Spreadsheet, PDF File, etc.) the application gets launched and opens the file. But it also shows the File Open dialog (Excel, Preview, etc...). This is quite annoying because Excel for example opens a blank spreadsheet when I click Cancel on the File Open dialog. Preview at least does nothing. But I still have to dismiss the extra dialog.
    Any idea how to fix this?

    Try to uncheck the Documents/Data check box in iCloud settings, in the perferences dialog.

  • Photoshop cancels a checkout when opening a file

    When you have a file checked out and then open it with Photoshop, it cancels the checkout (calls the ICancelCheckOutHandler implementation). Only Photoshop behaves like this, InDesign and Illustrator are just leaving the state in tact. Is this a bug in Photoshop or intended behavior?
    Tested and reproducible with
    OSX 10.6.8, Photoshop CS 5.1 and AD 3.2
    Windows 7, Photoshop CS 5 and AD 3.2
    How to reproduce
    Checkout a file using Bridge or Finder / Explorer
    The file is now in state "Checked out by me"
    Open the file in Photoshop
    This calls the ICancelCheckOutHandler implementation
    The file is now in state "Up-To-Date"

    Is this issue resolved in Photoshop Elements 8?
    I don't know -- haven't heard any reports of it, but that doesn't mean anything.  Neither does the lack of tech articles about the issue in the knowledge base (Adobe doesn't keep it well-updated).  The issue used to happen with me before I changed printers.  The best thing to do is to download the free trial of PSE 8 and try it.

  • File Open ... then all greyed out?

    Greetings,
    CS5, 12.0.1, iMac, with 2.8 GHz INtel Core i7.
    If I ask CS5 to open a file (File>Open) all menus simply grey out, and no dialog box appears to allow navigation to the file to be opened.  Ultimately I have to Force Quit, though Photoshop is not shown as "not responding." in that dialog box.  I'd appreciate any help understanding what is happening, and how to remedy.
    Thank you,
    Jim

    The open dialog is probably there, just offscreen somewhere.
    Pressing escape will close it.
    Did you have another display connected recently?  The OS may still think that display is active, and be putting the save dialog on that other display.
    Also, Spaces has been known to cause wonkiness like that (because it tricks the apps into thinking that multiple displays are active, and doesn't always work).

  • I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I alocate th

    I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate the extension .docx to Word? There used to be a way of doing it, I think under "Preferences" but I can't seem to find it.

    Still in the same location:
    File > Get Info > Open with (select) > Change All (button)

  • File open dialog doesn't appear after a period of time in latest version of Illustrator CC 2014

    Hi All,
    Is anyone else having a problem doing a File > Open after using Illustrator for a while? I select File > Open and nothing happens after I've used Illustrator for a while. Doesn't seem to be any pattern to it, the File Open dialog just doesn't appear so I have to shut down and re-open Illustrator.
    Thanks,
    Ben

    Hi Sumit,
    I've tried as suggested and reset preferences a few times as outlined on the help page you referenced, but I still have the same issue. If I open one file, within what seems to be a random amount of "open file" or "place" commands, the file open dialog is not invoked and I have to shut down Illustrator and re-open it. Then I can do a open or place once or twice before I'm locked out again.  Maybe a re-install of the app?
    Thanks,
    Ben

  • I downloaded an update for my Safari web browser to "snow leopard". When I click on the .dmg file, a window opens up with a .pkg file but when I click on the .pkg file I get a prompt saying that it doesn't know what program to open it with. with a

    I downloaded an update for my Safari web browser to "snow leopard". When I click on the .dmg file, a window opens up with a .pkg file but when I click on the .pkg file I get a prompt saying that it doesn't know what program to open it with.

    I suspect if you're trying to open a file in 08 that's been opened in 09 the file has been updated to 09 and will not open in 08.

  • On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom new document in order to open one. How can i have directly a new document when i click on pages icon

    On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom < new document> in order to open one. How can i have directly a new document when i click on pages icon

    How to open an existing Pages document?
    Click Pages icon in the Dock to launch Pages.
    When Pages is open, click File menu in the  Pages menu bar.
    Select “Open”.
    When the select document  dialog box opens up, highlight/select the document and click “Open”
    at the bottom right corner of the dialog box.
    s
    https://support.apple.com/kb/PH15304?locale=en_US

  • I have an iMac. , mid 2007.  Frequently, when I take an action, the little color wheel starts spinning and goes on for quite awhile.  Save a file, close a file, open a file, open a window, it's all random.  Somtimes it stalls, sometimes it doesn't.  Why?

    I have an iMac. , mid 2007.  Frequently, when I take an action, the little color wheel starts spinning and goes on for quite awhile.  Save a file, close a file, open a file, open a window, it's all random.  Somtimes it stalls, sometimes it doesn't.  Sometimes long, sometims short.  Why is this happening?

    Consider adding more memory. Be sure you have adequate free space on the hard drive - 15 GBs or 10% of the drive's capacity, whichever is greater. Do not run too many applications concurrently. Visit The XLab FAQs and read the FAQ on resolving the SBBOD.
    Do some maintenance:
    Repair the Hard Drive and Permissions
    Boot from your Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility.  For situations DU cannot handle the best third-party utilities are: Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. Drive Genius provides additional tools not found in Disk Warrior.  Versions 1.5.1 and later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems. For more about malware see Macintosh Virus Guide.
    I would also recommend downloading a utility such as TinkerTool System, OnyX 2.4.3, or Cocktail 5.1.1 that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.
    For emergency repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    SuperDuper!
    SyncTwoFolders
    Synk Pro
    Synk Standard
    Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.

  • I am trying to download photoshop presets from online but can't seem to figure out how to open them in photoshop. They download sucessfuly and then goes to my download folder on my computer, from there I double click on the file and photoshop opens and th

    I am trying to download photoshop presets from online but can't seem to figure out how to open them in photoshop. They download sucessfuly and then goes to my download folder on my computer, from there I double click on the file and photoshop opens and then nothing happens, any ideas? I am using a PC

    This video is a great step by step tutorial.
    Photoshop: How to Download & Install New Brushes & other Presets - YouTube
    Gene

  • How to force checked out CSV Files to open in Excel and not in Notepad

    Hi,
    I'm looking for some pointers / direction.
    .CSV files on SharePoint 2010 document library opens up in notepad by default. I did the DocIcon.xml CSV entry, changed the MIME type in IIS and did the IIS reset. Also on client computer CSV file is associated with MS Excel 2013. Now clicking a CSV file
    opens it up in MS Excel.
    Now a user checks out a CSV file and the same user clicks on the CSV file, the file is opening in notepad! If other users clicks on the same checked out file (checked out by the first user) it opens up in Excel for them. I've tried the 'Edit in Microsoft
    Excel' from the pop up menu but with same result.
    How can I force a checked out CSV file to open in MS Excel?
    Thanks

    1. Highlight one of the images and press cmd+i (or right click and select "Get info")
    2. Click the dropdown menu and select Photoshop (you might have to click "Other..." to find it.
    3. Then click "Change All" button below.
    You're going to have to do this with every different TYPE of image (e.g. jpeg, tiff etc) but once you've covered all the types you won't have the problem again.
    Hope this helps!

  • The zoom in zoom out gesture doesn't work on my iPhone 5c. Like when opening an app it doesn't zoom out and opens.

    The zoom in zoom out gesture doesn't work on my iPhone 5c. Like when opening an app it doesn't zoom out and opens. It also doesn't zooms in while pressing the home button to return. The gesture is just like any other Android phone. Like while closing an app by pressing the home button the icons seem like zooming in and falling back to their respective places. This thing happens in my friends' iPhones but this thing doesn't happen on my iPhone 5C. Please help.. I am unable to find anything wrong with the settings either.
    Message was edited by: Prats20

    I have another query though. Is it possible to always logged into my Gtalk from iPhone? I am using an app called Gtalk Lite. But every time I double press the home button and swipe up the apps to close them from running in the background Gtalk lite logs me off. I have to log in to Gtalk lite again. I was looking for something like that happens on Android phones. You are always logged in even after you close them from running in the background. And also is it possible to log in to more than one gmail account on Gtalk in iPhone?

  • Bridge File Open in camer raw, is grayed out. Camera raw works in PS.

    Why, when a raw file open in Bridge with a double click opens in camera raw, that same file in bridge the 'open camera raw' option in the file menu is grayed out?

    There are 3 places to check this option, 1 in Bridge preferences itself, 1 in the camera raw preferences via Bridge and the last one in the PS preferences from PSCS3 itself.
    They all should have a checkmark. But there are some issues with this option. You might also want to refresh the preferences with restarting Bridge an holding down option key and after doing so again check and set the prefs to your wishes.

  • Running Out Of FIle Descriptors "Too many open files"

    We have a 32 application(running on Solaris 8) that opens socket connections and also some files in read/write mode. The application works fine in normal(under low load) case.
    But it is failing under stress environment. At some point under stress environment, when it tries opening a file, it(fopen) gives me error code 24 that means that "too many files opened".
    From this it seems that the application is running out of file descriptors. I used the truss, pfiles and lsof utilities to see how many descriptors are currently opened by my application and the number it gives is around 900(and this is the expected figure to be opened by my application).
    I also set the ulimit(both hard and soft) to a larger number but it also didn't work. Also when i set the soft limit to 70000, the truss output shows like:
    25412/1:     5.3264     sysconfig(_CONFIG_OPEN_FILES)               = 70000
    23123/1: 7.2926 close(69999) Err#9 EBADF
    23123/1: 7.2927 close(69998) Err#9 EBADF
    23123/1: 7.2928 close(69997) Err#9 EBADF
    23123/1: 7.2928 close(69996) Err#9 EBADF
    23123/1: 7.2929 close(69995) Err#9 EBADF
    23123/1: 7.2929 close(69994) Err#9 EBADF
    23123/1: 7.2930 close(69993) Err#9 EBADF
    This goes to close(3).. loops almost 70K times.
    Don't know why such output is.
    Note: under moderate stress environment where only 400 file descriptors are opened, the application works fine.
    can you please help me in this? Is this the file descriptor problem or can be other potential source of problem.
    Is this any other way to increase the file descriptor limit.
    I aldo trying using LD_PRELOAD_32=/usr/lib/extendedFILE.so.1 but it gave me following error while starting application:
    "ld.so.1: ls: fatal: /usr/lib/extendedFILE.so.1: open failed: No such file or direcroty"
    Also i cant use purify(because of some reasons) to find file descriptors leakage(if any) and is not possible to upgrade the system to Solaris 10.
    Thanks in advance.

    http://developers.sun.com/solaris/articles/stdio_256.html

Maybe you are looking for

  • Multiple sound cards on one syst

    is that possible? to control different sound environments... If yes how many can I have on one system, what type of hardware/software to control it's I will like to have on Windows. Regards DonabDon

  • My i pod has songs in the library but cannot update - PLEASE CAN YOU HELP?!

    I keep getting the message that says "song's on the i pod cannot be updated because all the playlists selected for updating no longer exist" I currently have no songs on my i pod and can't seem to get them from my library to my i pod. Do i need to cr

  • Using usb webcam with facetime

    I have a generic USB Webcam 720p connected to a USB port on my Mac Mini (2012 version) running 10.8.2. Tried using webcam on facetime, my HD monitor doesn't have webcam, for the first time. When opening FT the image from webcam displayed in the windo

  • N73 Ringtone

    Hi friends I have a problem with my Nokia N73 Me and it made me angry. it's the problem: resently sometimes when my phone rings the ringtone that rings isn't that one which I selected it to my profile. And I examed to many ways for resolving the prob

  • Files modified by 10g Release 2 (10.2.0.4) Patch Set 3 for HP-UX Itanium

    Hello, anyone knows what are the files modified by 10.2.0.4.0 Patch Set 3? or where can I found this information? Thanks in advanced.