Find the answer to your Linux question:
Results 1 to 7 of 7
I am trying to add text in JTextField using Linux/Ubuntu "xvkbd" keyboard. Please follow the below steps to reproduce this issue. 1. If not having xvkbd keyboard please install with ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    5

    Not able to add text using xvkbd keyboard of Linux/Ubuntu on JRE6

    I am trying to add text in JTextField using Linux/Ubuntu "xvkbd" keyboard.

    Please follow the below steps to reproduce this issue.

    1. If not having xvkbd keyboard please install with below command
    apt-get install xvkbd
    2. After installation type xvkbd command on terminal. It will open the xvkdb keyboard.
    3. Run the below code textFieldText.java file.
    4. Click on the focus button of xvkbd keyboard and after that click in text field
    5. Trying entering some text in JtextField by clicking on xvkbd keyboard

    Observe that on JRE5 it is working fine but not on JRE6. Please suggest something to solve this issue.

    Below is the sample code.

    package com.focus;
    import javax.swing.JFrame;
    import javax.swing.JTextField;

    public class textFieldText {

    public static void main(String args[])
    {
    JFrame jf = new JFrame();
    JTextField txtF = new JTextField();
    jf.add(txtF);
    jf.pack();
    jf.setSize(200, 200);
    jf.setVisible(true);
    }
    }



    Regards,

  2. #2
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Doesn't work for me either running Java 1.6.0_14. Have you created a ticket with Sun?

    Bug Database

  3. #3
    Just Joined!
    Join Date
    Aug 2008
    Posts
    5
    I have created a bug in sun database, Seems they will take more time to solve this issue. I am in urgent need of solving this. is there any workaround kind of thing?

    Thanks...

  4. #4
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    You have a couple of options that I can see:

    • Find where the difference between 1.5 and 1.6 is, then extend the class and override the method which is causing the problem and change the reference to your version.
    • Compile and run with 1.5

  5. #5
    Just Joined!
    Join Date
    Aug 2008
    Posts
    5
    Thanks for suggestions.

    When I compared the swing package of 1.5 and 1.6 I found there is change in all the files. Based on the above sample code which files I need to concentrate. I looked into JFrame.java but could not get the proper solution.

    Your second option will not workout because the application which we are using is ported on the JRE6. I have put my problem in a very small sample code in this forum.

    Regards,

  6. #6
    Just Joined!
    Join Date
    Aug 2008
    Posts
    5
    Any new suggestion on this. This issue is very critical for me.

  7. #7
    Just Joined!
    Join Date
    Jul 2008
    Posts
    2
    The problem appears to be in XToolkit. When I switched to MToolkit, I got the keyboard input to work again. We need to focus on the differences in the XToolkit between 1.5 and 1.6 I think.

Posting Permissions

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