Results 1 to 3 of 3
  1. #1
    Tlipre is offline Member
    Join Date
    Aug 2013
    Posts
    4
    Rep Power
    0

    Default Can I change language by JTextField gained focus

    I create some application by using java UI. And I want to change language when I focus on other JTextField.

    EX.

    Can I change language by JTextField gained focus-untitled.png

    When I focus on JTextField upper. Language will switch to English. But when I focus on JTextField lower. Language will switch to other language.

    Ps. I come from country where don't use English is Official language.
    If I use wrong word or wrong tense. Please provide me a correct word.
    Thank you

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default Re: Can I change language by JTextField gained focus

    Your English is fine.

    What part of this is confusing you? You can use a focus listener to detect when the JTextField gains focus, but then it's up to you to change the language of each component manually. Java doesn't have a built-in "change language" feature or anything.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Tlipre is offline Member
    Join Date
    Aug 2013
    Posts
    4
    Rep Power
    0

    Default Re: Can I change language by JTextField gained focus

    Thanks for answer. I confuse in how to change keyboard language and your answer make me clear.

Similar Threads

  1. Replies: 3
    Last Post: 11-14-2011, 05:13 AM
  2. Set Native language Font in Jtextfield
    By dhaivat in forum AWT / Swing
    Replies: 0
    Last Post: 08-03-2010, 02:04 PM
  3. Replies: 5
    Last Post: 08-25-2009, 09:41 AM
  4. how to focus to another JTextfield?
    By birdofprey in forum AWT / Swing
    Replies: 2
    Last Post: 04-09-2008, 01:08 PM
  5. add JToolTip on focus gained forJTextField
    By ismailsaleh in forum AWT / Swing
    Replies: 6
    Last Post: 02-01-2008, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •