Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Display Unicode value in JTextField

  1. #1
    Junior Member
    Join Date
    May 2012
    Thanked 0 Times in 0 Posts

    Default Display Unicode value in JTextField


    I have a column in oracle table having data type as NCHAR, and carrying value in UNICode (i.e. its a person name in urdu language).

    Right now I retrieved the above column value from oracle by using below statement:

    ResultSet rs = ((OracleCallableStatement)stmt).getCursor(2);


    setDataArray(rs.getString(1));// Ignore this line; its working fine
    setDataArray(rs.getString(2));//Ignore this line; its working fine
    Reader name_native = rs.getCharacterStream(3);


    Now, I don't know how to convert above Reader object for JTextField to display Unicode value.

    Therefore, its my request to help me to resolve this issue, or may be I am not on the right path then please suggest me what to do; to accomplish the task i.e. display urdu in JTextField.

    Looking forward to your kind and positive response.



  2. #2
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Tavistock, UK
    Thanked 103 Times in 93 Posts

    Default Re: Display Unicode value in JTextField

    What's wrong with JTextField.setText(rs.getString(3)) ?

    In Java, Strings *are* Unicode:
    Chapter*4.*Types, Values, and Variables

Similar Threads

  1. [SOLVED] Problems Display Unicode Directly from Keyboard
    By jbolat in forum What's Wrong With My Code?
    Replies: 3
    Last Post: May 12th, 2012, 02:44 AM
  2. Trying to display Unicode characters
    By kc120us in forum What's Wrong With My Code?
    Replies: 12
    Last Post: January 16th, 2012, 05:55 PM
  3. Display a JTextField inside a JPanel
    By nivangerow in forum What's Wrong With My Code?
    Replies: 13
    Last Post: January 8th, 2012, 01:28 PM
  4. Replies: 6
    Last Post: January 28th, 2011, 01:13 AM
  5. java and unicode ...
    By abesha in forum Java Theory & Questions
    Replies: 2
    Last Post: November 15th, 2010, 11:25 AM

Tags for this Thread