• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Language Setting in Swing not working now

hello there,

I have a JInternalFrame form which opens in a JDesktopPane.in the form i have JTextField which takes name in english and persian.first is the english name testfield which is straight forward to type in.the second textfield takes the persian name.which when gets the focus i change the Locale to Locale l = new Locale("fa","IR"); using focusListener.it works fine to some extend.i mean i can type from right to left in the second TF,but does not recognize persian fonts,it only recognizes arabic fonts.
in my previous question i asked at EE called Title: Keyboard Language Setting in Swing Applications. i was able to acheive this persian thingy.but now when i have made a little more complex UI.it does not work.please help me to acheive my goals.

cheers
zolf
0
zolf
Asked:
zolf
  • 2
2 Solutions
 
objectsCommented:
not sure if swing supports mixed input methods, are you calling selectInputMethod() in your focuslistener?
0
 
zolfAuthor Commented:

the problem was with the font.persian is only supported with some fonts.i changed the font to arial ad it worked.
i have one another question.can you refer me to some good site where i can insert data to a oracle 10g database from java.

cheers
zolf
0
 
Mayank SAssociate Director - Product EngineeringCommented:
You have plenty of samples here, you can use most of them for Oracle - just make sure you give the correct driver-name:

http://www.javaalmanac.com/egs/java.sql/pkg.html

Download the driver from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/
0
 
objectsCommented:
> the problem was with the font.persian is only supported with some fonts.i changed the font to arial ad it worked.

perhaps also change the font in your focus listener
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now