Locale.setDefault() doesn't pick up fonts .. workaround?

hi,
I've recently tried adding a command-line option to a swing application so you can specify the locale to use. This is to avoid having to fiddle with the locale via Windows Settings->Regional Settings which is quite slow to use. The problem is that the fonts used by the jvm seem to be picked up at jvm start time - via font.properties (even before any GUI code has executed.. ??)
has anyone tried/got working something similar?
thanks,
asjf

Why not create a font chooser as well. You've got a locale chooser, so....a font chooser wouldn't be much
more difficult.thats an interesting idea - the fonts in question are those used by the gui framework itself - ie not ones usually selected by the user but it would be possible to manually change the UIDefaults for each component.
have recently found Mac OS X doesn't seem to hit this - presumably it uses a font defined for all Unicode values as its default??
thanks,
asjf

Similar Messages

  • Locale.setDefault doesn't affect JOptionPane or JFileChooser in JDK1.4.2_05

    My program only has English version. When setting "Standards and formats" to Chinese,
    the buttons in the dialogs of JOptionPane are in Chinese instead of OK, Cancel.
    So in the beginning of the program, I set the locale to Englist by Locale.setDefault(English).
    In JDK1.3.1_11, the strings of buttons are changed to English.
    But in JDK1.4.2_05, the strings are not changed and still in Chinese.
    How can I make the Locale.setDefault to have same affection in JDK1.4?
    Does anyone have some knowhow about this problem?

    Perhaps you found a solution already.
    If not here it is:
    //change to english entries for JOptionPane;use, then restore.
    String sOk = (String) UIManager.get("OptionPane.okButtonText");
    String sCancel = (String) UIManager.get("OptionPane.cancelButtonText");
    UIManager.put("OptionPane.okButtonText", "Ok");
    UIManager.put("OptionPane.cancelButtonText", "Cancel");
    .... use ...
    UIManager.put("OptionPane.okButtonText", sOk);
    UIManager.put("OptionPane.cancelButtonText", sCancel);
    Regards

  • JRE 8 and Locale.setDefault(), java 8 update 5, Windows 7

    Hello,
    I have simple question that i can't resolve.
    I am working on JavaFX application in which I am using DatePicker. This part is not important.
    My date picker is formating date based on my Windows 7 OS Regional and Language settings(Formats).
    This part is now relevant:
    In order to try to make my app Regional independant, and show date format always as US, I only once used this line of code:
    Locale.setDefault(Locale.ENGLISH);
    Here is problem:
    Now when I remove this line of code "Locale.setDefault(Locale.ENGLISH)" my application is no longer able to get Regional format from my Windows 7 OS Regional and Language settings(Formats). Locale informations are permanently lost in JVM. Things are even worse, because my JDBC connection is not working now, and it reports:
    java.sql.SQLException: Locale not recognized
      at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1006)...
    How can I revert to old JVM behaviour, and get Locale information from my Windows 7 OS Regional and Language settings(Formats) automatically? Any help?
    The application now is only working when there is Locale.setDefault(Locale.ENGLISH); line in code.

    I am constantly using JRE8. Now
    Locale.getDefault(Locale.Category.DISPLAY) returns en_US which is OK
    and
    Locale.getDefault(Locale.Category.FORMAT)? returns bs_BA_#Latin witch is something I set wrongly with my Locale.setDefault.
    I think that this bs_BA_#Latin. How can I repair this and make JRE8 read Locale settings from regional settings?
    Many thx

  • Dreamweaver, OS X 10.4, Local folder doesn't exist?

    Since getting my brand new MacBook from Amazon a few days
    ago, I've been struggling with getting DW (7 and 8) to work with
    local folders.
    After I Define Sites and enter the info for my local copies
    of the site's files, I connect to the server. The Remote view shows
    the files on the server, but when I switch back to the Local view,
    it says the folder where my files are, doesn't exist.
    I can interact fine with the Local files (create, rename)
    until I connect to the Remote computer. After I do connect, when I
    go back to the Local view, it says the Local folder doesn't exist.
    Sometimes when updating the Site it sometimes says "Can't
    create local folder" so Im guessing DW isn't able to hold onto the
    fact that the Local folder is there somehow.
    I've repaired permissions, verified the disk, made sure the
    most recent patches are applied on DW (7.01 and 8.02), deleted the
    DW prefs for both versions. I've even created a new user on my Mac
    and created the new site folder from scratch, but this problem is
    happening with all user accounts on this Mac.
    Everything was working fine on the old PowerBook before I
    used the Migration Utility to automatically bring things over.
    Desperately in need of help!

    I think that WAS it. Holy Weekend Waster Batman! I spent the
    last few days of my life on debugging because of that space
    character.
    I had found a workaround in that I could use a disk image
    that I created on my Mac. That, I guess, worked because of the
    filename.
    I had thought it was some Permissions thing since the disk
    image had totally open permissions. But it seems the space
    character was the reason.
    Thanks!!!!!
    bdemil

  • Copying from Oracle SQL Developer to Microsoft Word doesn't retain formatting (Font,colors etc)

    Copying from Oracle SQL Developer Worksheet doesn't retain formatting (font,color etc...)in Microsoft Word but copying from other programs such as
    visual studio, chrome browser etc works fine. This doesn't work even after changed the setting to Keep Source formatting of Options-> Copy and Paste Settings

    Hi,
    I notice that you have cross posted in Answers forum and Oracle forum. Have you tried Mr. Peter's suggestion?
    Then, I recommend we check the Word settings:
    1. Go to: Options > Advanced > Cut, Copy and Paste
    2.  Make sure that Use smart cut and paste is ticked. 
    3. Click the Settings button next to this option
    4. Make sure that Smart Style
    Behavior is checked.
    If the issue still exists, please upload a sample through One Drive, I want to test.
    Regards,
    George Zhao
    TechNet Community Support

  • I scanned an image and want to use the image trace tool, but it doesn't pick up all the lines.  Is there a way to darken the lines before using the image trace tool?

    I scanned an image and want to use the image trace tool, but it doesn't pick up all the lines.  Is there a way to darken the lines before using the image trace tool?  Help!

    If the scan is in B&W, then play with the Threshold setting here
    If it's in Color, then you will have to open the scan in a Raster editing software (like Photoshop) and play with the Brightness/Contrast settings to make the lines bolder.

  • File(FTP) Adapter doesn't pick any file from FTP server

    Hi All,
    This is a strange problem. I am trying to pick all the file from a FTP server using File Name: . . But the file adapter doesn't pick any file from the directory. When  I change it to a specific file name eg. ABC.txt then it picks up the file ABC.txt only.
    My requirement is to pick up all files in the directory and I just do not seem to understand what is wrong. I have used this wildcard option several times earlier and it always worked fine. But in this case, this does not work.
    I changed the FTP server to point to an internal FTP server and it works fine.
    I have checked all my parameters and everything looks okay. Like I mentioned earlier, if you specify exact file name, it picks up the file.
    Any guess as to what is going on here?

    Transport Protocol: FTP
    Message Protocol: File
    source directory: /test or test ( <b>either one works</b>)
    file name: * or . or *.txt <b>nothing works</b>
    server: ftp server name
    port: 21
    data connection: passive
    user: ******
    pass: ******
    connect mode: permanently
    transfer mode: text
    QOS: exactly once
    poll: 10 secs
    processing mode: archive ( <b>changed to test and delete as well, but made no difference</b>.)
    archive dir: dir path
    file type: text
    adapter specific attributes:
    checked: set adapter specific attributes
    and file name.
    status: active.

  • I have 2 Apple ID's. I bought all my music on first one. Now, update/sync doesn't pick up musiuc bc using a new Apple ID.... can i merge them onto my iPhone?

    I have 2 Apple ID's (the old one and my newer one - attached to a new email address).
    I bought all my music on first one.
    Update/sync doesn't pick up music bc using a new Apple ID.... can I merge them onto my iPhone?

    No.
    Content bought using one Apple ID cannot be merged or transferred to another Apple ID.
    All content is forever tied to the Apple ID used to obtain them.

  • I'm using mac with the newest operating system (snow leopard 10.6.7). since I've updated to Firefox 4 It doesn't display Hebrew fonts- I didn't have any problems with it before the upgrade and in safari I don't have this problem.

    Hello, I'm using Mac with the newest operating system (snow leopard 10.6.7). since I've updated to Firefox 4 It doesn't display Hebrew fonts… I didn't have any problems with it before the upgrade and in safari I have no problem with it. please help me- I don't like to use safari a my browser...

    elly903 wrote:
    Before commenting - I CANNOT install Mavericks because it'll mess up the versions of Filemaker Pro and Quicken that I use regularly...
    Quicken 2007 for Intel (Snow Leopard, Lion, Mt. Lion and Mavericks) for $15:
    http://quicken.intuit.com/personal-finance-software/quicken-2007-osx-lion.jsp
    It will input your Quicken PPC data file directly if it was Quicken 2005 through 2007.  If older you need Quicken 2006 or 2007 PPC first to convert your data file; and this update must be done BEFORE you upgrade to Mavericks:
    http://quicken.intuit.com/support/help/patching/quicken-2006-manual-updates--mac -/GEN82200.html
    Filemaker Pro PPC (in this case 7) running in Snow Leopard Server installed into Parallels for use in Lion, Mt. Lion and Mavericks:
                                  [click on image to enlarge]
    Snow Leopard Server: 1.800.MYAPPLE (1.800.692.7753) - Apple Part Number: MC588Z/A (telephone orders only)
    This solution allows you to run your Photoshop Elements in Mavericks concurrently with Filemaker Pro PPC.  Mavericks is a free download.

  • When I plug my iPad into my laptop it doesn't pick it up on iTunes?

    When I plug my iPad into my laptop it doesn't pick it up on iTunes?

    You did not state what OS you are running ... so for Windows
    iOS: Device not recognized in iTunes for Windows - Support - Apple
    For Mac OS X
    iOS: Device not recognized in iTunes for Mac OS X - Support - Apple
    Only for Mac OSX 10.6
    Mac OS X v10.6: iOS device not recognized in iTunes after restart

  • Why Apple iPhone doesn't have Khmer Fonts Original language???

    Why Apple iPhone doesn't have Khmer Fonts Original language???
    A lot of people using iPhone at Cambodia, So Please Apple make the Khmer Language in iDevices for Cambodian who always love Apple so much...

    Nobody here can tell you "why".  Let Apple know you want this via
    http://www.apple.com/feedback

  • Change Account Workflow in CUP - Doesn't pick up existing values for an Acc

    Hi,
    When using the change account option available in the CUP(5.3 SP 7), I expected the system to populate the user details as they exist in the provisioning system once I enter the account details that need a change. We have the 'Search' and 'User Details' Data source configured to the same SAP R/3 system.
    For eg, when requesting for a new account, I've chosen an Employee Type attribute as 'Non-Employee' (SAP delivered request attribute) and entered some values for my custom attributes .
    And when I chose to change the same user account, I notice that the system doesn't pick up the existing values for any of the attributes and render them. For the Employee Type attribute, it shows the default value and for the custom fields, they are shown blank!!!!
    It does seem like the user attribute values from R/3 are being picked up and displayed correctly, but the ones from GRC Database are left out.
    I believe this to be a bug and does anyone experienced  this issue and found a fix????
    Thanks,
    Anil

    Hi Alpesh,
    Thanks for your response.
    This brings up a basic question on the repository for saving user attribs...ie. does all these need to be saved on R/3? Assuming yes depending on our current configuration(We have the 'Search' and 'User Details' Data source configured to the same SAP R/3 system), do we have a standard field for saving the 'Employee Type' attrib in SAP?. I did perform a field mapping of a custom attirb to one of the SAP fields in the user master, and get it saved during user provisioning. But it doesn't pick it up from there when I perform a change account. Seems it's missing that reverse mapping. And I've chosen the 'Field Type' of the custom filed to Text as to enable free text during new account request.
    Hope you may find something more.
    Regards,
    Anil

  • Error Message. IE doesn't recognize webkit font, converts to arial

    MuseJSAssert: Error calling selector function:TypeError: 'undefined' is not a function (evaluating 'PIE.attach(this)')
    I get this error in IE only. Also, IE doesn't recognize my font and converts everything to Arial, so it's all bigger and bolder and it doesn't fit how I want it to.
    I'd like to know what this error means and also how I can get IE to recognize the WebKit font that I have used.
    procleansupply.net

    Hi ChoreoGraphics,
    Search and ye shall find [see link below]
    Newsgroups in Safari or Mail?
    Hope that helps.

  • Local chain doesn't triggers. Have any one came across this problem?

    Hi Experts,
    We face this problem frequently in Process chains. The Local Chain Doesn't gets triggered.
    Checked the start variant. Things are fine.( Marked has 'Meta chain' or 'direct scheduling')
    The error Message got from the 'Display message' option follows:
    <i>Job started
    Step 001 started (program RSPROCESS, variant &0000000730265, user ID ALEREMOTE)
    Communication buffer deleted from previous run 44LFCE86BFU65ESQ5PR2N4MV8 (status G)
    Version 'M' of chain Zchain_name was saved without checking
    Version 'A' of chain Zchain_name was saved without checking
    The Chain Was Removed From Scheduling
    Program RSPROCESS successfully scheduled as job BI_PROCESS_COMPRESS with ID 08463401
    Program RSPROCESS successfully scheduled as job BI_PROCESS_DBSTAT with ID 08463503
    Job BI_PROCESS_DROPINDEX could not be scheduled. Termination with returncode 8
    Job BI_PROCESS_DROPINDEX could not be scheduled. Termination with returncode 8
    Job finished</i>
    The Local chain has the following steps:
    1.start
    2. delete index
    3.load step
    4. creat index
    5. activate ODS
    6. DB statistics
    7. compression.
    Let me know if needed more information.
    Thanks and regards,
    Kannan N

    the start variant for the local chain..should use the setting..'start using meta-chain or API'..and not 'direct scheduling'..
    error messages suggest that there is issue with dropindex job..
    the steps suggest that u r loading data into an ODS..so u dont need the steps for delete index,create index,db stats and compression(these steps are used only for loads to infocubes)
    so chain should be like this..
    1.start
    2.load step(to ODS)
    3. activate ODS
    4.further update from ODS to targets(if ODS loads to further data targets)
    u can also refer this weblog..
    /people/vishvesh.bahirat/blog/2006/11/29/bw-process-chain-design
    cheers,
    Vishvesh
    Message was edited by:
            Vishvesh

  • Tomcat doesn't pick up the changes to jsp files

    My original problem was JAR locking. I changed context.xml files both in conf\ and my application.
    jakarta-tomcat-5.5.9\conf\context.xml
    <Context  reloadable="true" antiResourceLocking="true" antiJARLocking="true">
           <WatchedResource>WEB-INF/web.xml</WatchedResource>     
    </Context>myApplication\META-INF\context.xml
    <Context  reloadable="true" antiResourceLocking="true" antiJARLocking="true">        
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
    </Context>Now I can undeploy without having jarLocking problem.
    But now tomcat doesn't pick up the changes to jsp files automatically!!!
    I have to undeploy/deploy even I just change jsp files!
    What's wrong?

    You can't do anything except speak in a different accent. Apple would have to add specific support for different accents in a future iOS update.

Maybe you are looking for