When I am running my application with JRE5 it is working fine. While working with JRE6 I found below mentioned issue.
I am generating jframe. After that clicking on text tool of my toolbar I am opening a JTextPane (In JInternalFrame) on the frame with Linux xvkbd keyboard. Using keyboard focus button I should be able to give focus to JTextPane and add text when click on Linux xvkbd keyboard.
When running with JRE5 I am able to give focus to JTextPane and enter text. But in case of JRE6 I am not able to give focus to JTextPane while clicking on this, the focus is going to parent (blank buffered image page) not to JTextPane. I am pasting a sample code below.
I am adding the code below. This code is using xvkbd keyboard of Ubuntu/Linux keyboard. In case you don't see the xvkbd keyboard please execute this command in terminal.
apt-get install xvkbd (This command will install the xvkbd keyboard on your system).
After running the below code please click on the focus key of xvkbd keyboard and click on the JTextPane added on JIF. Try to enter text in JTextPane from xvkbd keyboard, on JRE5 I am able to enter text in the JTextPane but on the JRE6 could not. Please suggest something on this problem.
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,