JFileChooser is a very nasty thing

Greetings,
Fiddling with JFileChooser objects I noticed a couple of peculiarities:
1) The 'Cancel' button text cannot be changed by the user
2) The text next to the selected file cannot be changed
3) The text next to the file filter cannot be changed.
I can remove most of the controls (as a result to an old question of
mine for which very satisfactory and fine answers were posted).
What's up with that component? Did it go through any design at all or
was it conceived while the programmer was sniffing cheap glue?
IMHO that JFileChooser thing is a total inconsistent mess. Does anyone
know whether or not better alternatives are available or should I write
my own localizable, modifiable version?
kind regards,
Jos

Jos!That's me! ;-)
[ snippety ... ]
The farthest I got was finding the method that
actually returns the dialog:[ snipped the createDialog method ]
Where are all the components actually getting put together and drawn?Not in that method; that's for sure. Don't forget that a JFileChooser
extends a JComponent and that's where all the other components are
stored. For now I localize all the text components in this JFileChooser
by 'put'ing the following keys in the UIManager:FileChooser.lookInLabelText
FileChooser.filesOfTypeLabelText
FileChooser.upFolderToolTipText
FileChooser.fileNameLabelText
FileChooser.homeFolderToolTipText
FileChooser.newFolderToolTipText
FileChooser.listViewButtonToolTipTextlist
FileChooser.detailsViewButtonToolTipText
FileChooser.saveButtonText=Save
FileChooser.openButtonText=Open
FileChooser.cancelButtonText=Cancel
FileChooser.updateButtonText=Update
FileChooser.helpButtonText=Help
FileChooser.saveButtonToolTipText=Save
FileChooser.openButtonToolTipText=Open
FileChooser.cancelButtonToolTipText=Cancel
FileChooser.updateButtonToolTipText=Update
FileChooser.helpButtonToolTipText=HelpI found those key strings by googling and scrutinizing sources. On top of
that I can show/hide those toolbars (and their buttons and stuff) like this:     private void hideComponents(Component[] components, boolean visible) {
          for (int i= 0; i < components.length; i++) {
               if (components[i] instanceof JPanel)
                    hideComponents(((JPanel)components).getComponents(), visible);
               else if (components[i] instanceof JToolBar)
                    components[i].setVisible(visible);
IMHO that JFileChooser API is a mess and far from complete. I'm afraid
I'll find the same mess when I put my teeth in the JColorChooser thingy ;-)
kind regards,
Jos

Similar Messages

  • My entire phone got hacked and now I believe there is a cloned phone number who is texting my contacts....very bad things and I don't know what to do....get a new phone?  New number?

    Within the last few months I have gotten several snap shots of conversations from friends that showed it was my phone number but the conversation was not from me.  It was someone using my information but texting frieda, family, and some co workers very obscene things.  But the person was using completely juvenile context and I don't do that at all with my texts.  The worst part was it began becoming such a huge issue when the cloned number or whatever was texting guys stuff and I wasn't the actual person texting.  I got no responses to my phone but I had some very confused friends and even at one point my boyfriend got texts from my number when I was literally sitting next to him and my phone was on the coffee table.  Anyone have any ideas on what I need to do.  I have reset my phone, deleted everything off of it, reset passwords, I don't use location services but I am still having people getting crude messages.  It's to the point now that my very own friends don't talk to me through text or my personal email because they don't know if it is truly me.  Please help!

    Your phone is not hacked however your sim card probably IS cloned.
    YOU need to contact your Mobile Network and local police right NOW !

  • I'm using Apple Mail 2.1.3 on a MacBook running OS 10.4.11. A very strange thing is happening. E-mail messages that I either sent or received months ago are showing up in my mailbox and receivers' mailboxes. Help!

    I'm using Apple Mail 2.1.3 on a MacBook running OS 10.4.11. A very strange thing is happening. E-mail messages that I either sent or received months ago are showing up in my mailbox and receivers' mailboxes. In one case, a message someone had sent to me wound up in the mailbox of a third person, who was not included in the address list!!  I have only two accounts, and have checked everything; only one account is showing the repeats Now, that account is my professional account, and it resides in three places: I use it on the laptop described here, I use it through Apple Mail on the much newer desktop Mac in my office, and I can run it through Web mail on my employer's server, which is where the professional account resides (I have a mailbox there, etc.) That program is called Zimbra.
    My personal account is with Earthlink and is not doing the repeats. I access it either through my MacBook's Apple Mail or the Web; the Apple Mail on my office Mac is not configured to access the Earthlink server.
    What IS going on here?? My friends, colleagues, and students (I teach college) are mystified by these ancient messages.
    Thanks for any help!!

    I'm using Apple Mail 2.1.3 on a MacBook running OS 10.4.11. A very strange thing is happening. E-mail messages that I either sent or received months ago are showing up in my mailbox and receivers' mailboxes. In one case, a message someone had sent to me wound up in the mailbox of a third person, who was not included in the address list!!  I have only two accounts, and have checked everything; only one account is showing the repeats Now, that account is my professional account, and it resides in three places: I use it on the laptop described here, I use it through Apple Mail on the much newer desktop Mac in my office, and I can run it through Web mail on my employer's server, which is where the professional account resides (I have a mailbox there, etc.) That program is called Zimbra.
    My personal account is with Earthlink and is not doing the repeats. I access it either through my MacBook's Apple Mail or the Web; the Apple Mail on my office Mac is not configured to access the Earthlink server.
    What IS going on here?? My friends, colleagues, and students (I teach college) are mystified by these ancient messages.
    Thanks for any help!!

  • A very strange thing . . .

    Hi all,
    A very strange thing just happened. One track in a project, which has several regions, just stopped playing back! All other tracks play fine. Even the track that stopped playing back, when selected, is still active, i. e., my midi controller still plays the software instrument associated with the track. All of the info is still there; I can see it all in the piano roll, the score . . . everything.
    One clue, which I'm not sure how to describe, is that in the problem track, all of the regions have changed color and now have a little dot in their upper left corner. So, the regions which were all green, the default color, are now gray and green, but have the little dot at the top left.
    Oh, this happened by accident while I was recording on that track. I was attempting to record a new region between two other regions, then suddenly this happened!!
    Anybody know what's going on here?
    Thanks, Joseph

    thanks for the gray tracks thing. I have worked with Performer since 1985. I am having the hardest time simply getting around on logic express. Copying, pasting, setting regions. I record and sometimes it doesn't erase the previous info. I paste a track and it goes to another track. How do I erase measures on one track? Sorry for the lack of clarity in this question but the manual has been hard to understand. COuld I call you? I know the answers are easy. I don't see the logic in logic. Any help would be appreciated. [email protected]
    fritzkersting.com

  • Very strange thing after 10.7.3 update?

    Very strange thing after 10.7.3 update?
    Everything seems to be working normal except the desk top BBC iPlayer which plays fine in a small window but when you go to full screen still plays the sound but the screen just goes black, no video?
    I thought maybe the update knocked off one of the plugins or players but reinstalled iPlayer and same problem, anyone got a workaround or suggestion as to how I can fix it, am I the only one?
    Full screen YouTube works fine.
    Everything else seems ok, maybe running a little hotter and the fans are kicking in a little sooner but does feel a little snappier.
    Thanks
    Phil

    Seems like they are on it
    http://iplayerhelp.external.bbc.co.uk/help/announcements/full_screen_mac_desktop
    I hope it doesnt take too long

  • Very strange thing happening

    I developed a spreadsheet today and had a very strange thing happen while I was working in Numbers.
    Every minute or so Stuffit Expander would open and expand a file and place it on my computer. It started out as a quick flash on the screen and would be gone in an instant. I saw that it was being made by Stuffit so I opened up Stuffit and went into Prefs and told Stuffit to ask before expanding the file. This, then, stopped the process so I could see what was going on.
    A folder was make called "[file name].numbersFolder"
    Inside the folder are two files called: "buildVersionHistory.plist" and "index.xml". Along with these files is a "QuickLook" folder that has a thumbnail of the spreadsheet I am working on inside.
    The xml file is large and has several URL's embedded including the Apple developer site (http://developer.apple.com/namespaces/sfa).
    Can anyone tell me what is going on here.
    Looks fishy to me!

    If I recall, this is StuffIt expanding what it thinks is a ZIP file. It is correct, in a way, but you don't want it to do that. I do not have StuffIt so I do not know what settings it has. Hopefully it has one along the lines of "automatically unzip zip files" and you can turn it off.

  • Hi, my current plans and products include Creative Cloud Photography plan (one-year) and Creative Cloud single-app membership for Photoshop (one-year), I only use photoshop occasionally and for very basic things, are these two plans required for basic p

    Hi, my current plans and products include Creative Cloud Photography plan (one-year) and Creative Cloud single-app membership for Photoshop (one-year), I only use photoshop occasionally and for very basic things, are these two plans required for basic photoshop use or am I able to go with one or the other ?

    PS is part of the photography plan, so your single app plan is redundant.
    Mylenium

  • Projects doing very weird things

    This has really been driving me nuts.
    I'm on Mac 10.8.5. Just recently updated to CC 2014 v8.
    I've been working on several projects lately, and very weird things are happening every time I open a project. Usually when you save and exit a project, when you reopen it, it will open to the same sequence you were last working on, but for some reason every time I open it will load a random sequence I hadn't worked on in a long time. Sometimes when I open, the project will load slowly indexing and conforming and generating peak files. After it thinking for 5 minutes, I go to play my sequence that was fine yesterday and now some audio tracks that are still in the timeline no longer contain any audio. When I match frame, the audio clip appears in source, but has no waveform and will not play any audio. Some audio tracks do not have waveforms but DO play audio, and when I match frame on those, the clip comes up and plays audio but shows no waveform.
    Restarted computer and now all the audio loads fine, but thumbnails for all video aren't showing.
    The other day I had a similar situation with VIDEO. Clips were randomly "pending" or "offline" and I would 'link' them, but it would remain offline or pending. Eventually it fixed itself somehow.
    I'm having a hell of a time here. This is really holding me back from my work. I'm not really sure how to troubleshoot this as it is different everytime.
    I'm working from an external harddrive that is brand new, and shouldn't be having any permissions issues...
    Any insight would be appreciated!

    Some trouble shooting:
    Open Premiere while holding down shift+alt until welcome screen then
    Clear out Media Cache database and remove remaining files in that folder manually.
    See if that will help.

  • MacBook won't turn on 98% of the time, help! Very weird things happening!

    Hi there, any advice you have for me would me much appreciated. What happened with my Macbook is all very strange.
    So, the morning before last, I was on my Macbook (which I bought in 2006 so it's on the older side, but otherwise worked great) and it was running low on battery. I was late for work so didn't plug it in before leaving. I left it open. However I have no roomates, pets, etc.
    When I get home that evening, I plugged in the powercord and it wouldn't turn on. After trying a million different things, like taking the battery out, reseting the PRAM, etc, there were a few times where I got it to turn on, went through the log on screen, and was able to use my computer like normal for about 5 minutes or so, and then it would just shut off.
    There were also many times when I would pres the power button and the screen would flash like it was about to turn on, and then it would make the noise that the computer makes when you're typically on 0% battery and it shuts down. Later in the night, when the computer was closed but plugged into the power outlet, it was by itself (meaning I wasn't pressing anything) making the noise that it was restarting. It made that noise about every 30 seconds for a few minutes. Weird.
    It was also doing inconsistent things re: the sleep light. At times it was on, including when the computer was closed, and sometimes it would go from on to off. Also, the battery/charing was doing weird things. The few times I was able to get past the log in screen it showed that it was at 0%, even though the light on the adapter was green and it had been plugged in for a long time. Another time the battery icon had an X through it. I have 2 different batteries and neither one of them seemed to make a difference.
    Also, yesterday I brought my computer into the Apple store and they put in a battery that was charged and it didn't seem to make a difference either. One more weird thing: when I did get the computer on in the spotlight bar it said it was indexing??
    Anyways, I'm just confused/upset, etc. because I literally did nothing to the computer. I didn't drop it/spill on it, etc. I'm also frustrated because the guy at the genius bar litteraly only spent like 5 minutes looking at before he said i was SOL. He said it was the "main board" that was the problem. One of the things like I'm just confused by is if the main board really does need to be replaced, then how was I able to get the computer on and working those few times???
    Sorrry this is so long, any help would be awesome!! I just don't have the money to buy a new computer, and I'm not sure it will be worth it for me to pay $300 to have it fixed when my computer's already pretty old and other things haven't been working for awhile (like my disc drive, camera). THANK YOU!!!

    EmadJamal,
    the battery won’t melt because of long connection to the AC charger, although that has the potential of reducing the battery’s life.
    Do you have access to a second 60 W AC charger to test with your MacBook Pro, or access to a second 13-inch MacBook Pro against which your AC charger could be tested?

  • The very best thing about the retina display

    Do you know what is the best thing about the retina display? the answer is they've solved the issue of the dead and stuck pixels thing you know how because the pixels are very very small so u can't see if it's working or not some day you will walking around holding your new ipad and you don't even know the plenty pixels that are dead and you can't notice them HAHAHA that was a good one LOVE YA APPLE.

    I doubt that's the reason Apple spent the money on retina displays, but a good observation. 

  • Macbook Pro Headphone Jack, a very strange thing going on with it? help

    Hello,
    My Macbook Pro 15" Mid 2011 has had this very annoying small issue for over a year with the headphone jack. Sound only plays through the headphone jack as per normal when i restart the laptop, but once i remove the headphones and plug them back in sound isn't going through the headphone, it's going through the speakers as if headphones aren't plugged in, to have it working as normal i have to restart the laptop again.
    Is this a hardware or software issue?
    Please help me resolve this..
    Thanks,
    Jacob

    Welcome to Apple Discussions!
    Since this is a brand new MBP under warranty, the best thing to do is to contact Apple and tell them about your difficulties. If you have access to an Apple Store, you might want to bring your Mac in and show them what it is doing. This does not sound at all normal, and it's very possible that you have hardware issues involved. If so, you should be eligible for a repair under warranty or possibly even a replacement if you are still in the first 2 weeks of ownership.
    There is a long thread which may be relevant:
    http://discussions.apple.com/thread.jspa?messageID=12542170
    It's probably too long to read the whole thing, but you might browse the posted images and see if this looks like your problem.
    Good luck!

  • A very strange thing happening with Nokia Map Load...

    I am trying to load new maps onto my x6.
    When I click on Nokia Map Loader it tells me that another instance of the programme is running and that I need to close that one down first.
    But this is not the case. I have no other programmes running.
    It mentioned that I might have the maps updater programme running. Again that wasn't true.
    I uninstalled both and started again.
    Same problem.
    I try launching map loader through pc suite. Same thing.
    I am really flummoxed and I hope someone can help.
    Thank you.

    Did you set up "hot corners" for Expose?
    I bet you have the up/left corner set for "Application Windows" then when you move over and have no apps open you get the warning noise. When you move slowly you just don't hit the corner to triger expose
    D:

  • READ A VERY FUNNY THING

    Hi everybody,
    i have something that is relly funny.. i will try to discribe it shortly
    i am using JSF and JBOSS
    i have a Form in my jsp with one field ... after clicking submit the request will be sent to a bean and should be valideted
    the funny thing is that when i use firefox everything go OK but when i use IE :
    - if i click submit with the mouse or press enter then everything is OK
    - if i press enter the request will not be sent !!!!!! if i click enter with mouse goes OK...........
    can some one tell me what is happening?????
    P.s.: if i have a form with 2 or more fields then there is no Problem
    form code:
    <h:inputText  value="#{NewsLetterBean.surname}" id="firstname" size="50" />
    <h:commandButton id="abon_id"      
    action="#{NewsLetterBean.subscribe}" value="subscribe"></h:commandButton>thank u

    I said the onsubmit event of FORM tag
    Here is an example of the same situation you are facing ..
    <html>
    <body>
    <script>
    function doSubmit()
    document.forms[0].action="http://msn.com";
    //dont submit here else u might send 2 requests to server
    </script>
    <form name="rr" action="http://yahoo.com" onsubmit="doSubmit()">
    <input type="text" name="sdf" value="dfg" />
    <input type="button" name="" value="" onclick="doSubmit()"/>
    </form>
    </body>
    </html>Please note that if you remove the onsubmit event of form tag then on clicking enter key it goes to yahoo.com
    Cheers
    -Rohit

  • Systemd very nasty with incorrect setup

    There was an error in my fstab. An entry for a partition that was not there anymore. But this partition wasn't essential. But instead of giving me a warning, it began by waiting for 90s until ask me "Give root password for maintenance or Press Crtl-D to continue). I pressed Ctrl-D but the machine hung. After pressing random key nervously, I see once again the 90s countdown. At this point, I forcedly reset the machine and booted a rescue disk. Is it not possible to configure systemd to be a little more tolerant. it might have waited for 10 sec, gave me a warning and booted anyway. The only thing to do was to remove the entry for the non existent partition in /etc/fstab.

    No, it's nofail. From my fstab:
    /dev/vg0/v_build /home/testing/build ext4 defaults,stripe=512,data=ordered,nofail 0 2

  • VERY annoying thing with XServer "Can't open display" after a while

    This issue is *very* annoying I would love if someone could help.
    I had this issue for a long time, thinking I'll fix it. I googled, but everybody seems to have the same problem, but no fix (only temporary ones).
    So here's the problem : I installed archlinux on my (very old) laptop, everything works great, now I even installed the XServer, which however is causing this problem:
    everything works good for a while, but after a while, I can't launch any new programs, but existing ones work good... If I try to start any X-App in an already running terminal, it gives me:
    No protocol specified
    xterm Xt error: Can't open display: :0.0
    However, all already running apps run fine, they even can create new windows!
    The only fix I found for this is to kill & restart the xserver with ctrl+alt+backspace.
    Here's my xorg.conf:
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    EndSection
    Section "ServerFlags"
    Option "AutoAddDevices" "False"
    EndSection
    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/TTF"
    FontPath "/usr/share/fonts/Type1"
    EndSection
    Section "Module"
    Load "extmod"
    Load "xtrap"
    Load "glx"
    Load "dbe"
    Load "dri"
    Load "freetype"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "probe_sparse" # [<bool>]
    #Option "accel" # [<bool>]
    #Option "crt_display" # [<bool>]
    #Option "composite_sync" # [<bool>]
    #Option "hw_cursor" # [<bool>]
    #Option "force_pci_mode" # [<bool>]
    #Option "dma_mode" # <str>
    #Option "agp_mode" # <i>
    #Option "agp_size" # <i>
    #Option "local_textures" # [<bool>]
    #Option "buffer_size" # <i>
    #Option "tv_out" # [<bool>]
    #Option "tv_standard" # <str>
    #Option "mmio_cache" # [<bool>]
    #Option "test_mmio_cache" # [<bool>]
    #Option "panel_display" # [<bool>]
    #Option "reference_clock" # <freq>
    #Option "shadow_fb" # [<bool>]
    #Option "sw_cursor" # [<bool>]
    #Option "AccelMethod" # <str>
    #Option "RenderAccel" # [<bool>]
    Identifier "Card0"
    Driver "mach64"
    VendorName "ATI Technologies Inc"
    BoardName "3D Rage LT Pro"
    BusID "PCI:0:5:0"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
    Here's lspci of my VGA controller (this is probably irrelevant, because people will all sorts of hw have this problem, but here it is anyway):
    [x@y ~]$ lspci | grep VGA
    00:05.0 VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro (rev dc)
    XServ version:
    X.Org X Server 1.5.3
    Release Date: 5 November 2008
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.27-ARCH i686
    Current Operating System: Linux 2.6.28-ARCH #1 SMP PREEMPT Sun Feb 8 10:13:45 UTC 2009 i686
    Build Date: 17 December 2008 08:20:05PM
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    I would be grateful if somebody could help me.

    Just to let you know, I updated X to the latest version right now.
    Here's the new output of X -version:
    X.Org X Server 1.6.1
    Release Date: 2009-4-14
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.29-ARCH i686
    Current Operating System: Linux 2.6.28-ARCH #1 SMP PREEMPT Sun Feb 8 10:13:45 UTC 2009 i686
    Build Date: 15 April 2009 11:09:10AM
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.

Maybe you are looking for

  • Memcmp in Solaris 10 i386

    Hi - When I use memcmp() function in Solaris 10 i386, it does not seem to work. When I convert the arguments to strings and then use strcmp, they seem to work fine. Is there something I am missing. The same code with memcmp etc works fine on Solaris

  • Activate parallel currency in a company

    I need to activate parallel currency in a company which is already in production. Anybody knows how to proceed?? thanks, Cecilia

  • Satellite A350 - error when installing latest Bios (64bit OS)

    I can't figure out what is wrong: I'm trying to install the latest bios, bios-20090803144625 (64bit), on a Statellite 350 running Windows 7 RC. I get the following error from "Phoenig WinPhlash64": "Failed to receive system Bios information BCPSYS bl

  • UCS Server CPU Allocation

    Dear Guys... As i am aware aabout UCS server and UCS system.. one physicla cpu is equal to virtual cpu... but as i seen many application that having more that 6 cpu need i want to run on one UCS sever...how can adjust the cpu for them? As i have give

  • I lost my iphone 5 , how do I track it ?

    someone stole me iphone , how do I track it and find the location of where my phone is ?