Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:34:26+00:00 2026-06-09T21:34:26+00:00

I have a form which contains JTextFields, some are specific for French and others

  • 0

I have a form which contains JTextFields, some are specific for French and others for Arabic.
i want to switch from a language to another without pressing alt+shift key.
any help on the solution will be appreciated. thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:34:28+00:00Added an answer on June 9, 2026 at 9:34 pm

    Thanks aymeric for your answer, but i found a solution for the problem, here is how i resolve the problem:

    public void Arabe(JTextField txt) {
        txt.getInputContext().selectInputMethod(new Locale("ar", "SA"));
        txt.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);    
    }
    
    public void Français(JTextField txt) {
        txt.getInputContext().selectInputMethod(new Locale("fr","FR"));
        txt.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);    
    }
    
    private void txt1_FocusGained(java.awt.event.FocusEvent evt) {                                     
        Arabe(my_textfields1);
    }                                    
    
    private void txt2_FocusGained(java.awt.event.FocusEvent evt) {                                        
        Français(mytextfields2);
    }          
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which contains some unique input fields and some others with
I have a form which contains some checkboxes and in one of the checkboxes,
I have a form which contains a whole bunch of checkboxes and some other
I have a form which contains a checkbox field. On page load I want
I have a form which contains some rows, each has a checkbox in the
I have a form which contains among others: <form id=new_basic_ad class=new_basic_ad method=post enctype=multipart/form-data action=/basic_ads
I have a form which contains several standard controls (textbox's, buttons, etc). I want
I have a form which contains a select named Client_ID as well as some
I have a form which contains 2 <select> fields numbered from 0 to 10.
I have a form which contains a lot of elements, my DB guy has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.