-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
x86
-
windows_98
Name: skT88420 Date: 12/23/99
"java version "1.3beta
)Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java(TM) HotSpot Client VM (build 1.3beta-O, mixed mode
1.Take a JTextArea and call its setComponentOrientation() method with
ComponentOrientation.RIGHT_TO_LEFT as parameter and you will be able to notice
that the caret wont pass to the right side. (but it would work with JTextField)
here I simply copied the code I have (so dont pay notice to irrelevant stuff)
Thanks ,
Daniel
//import com.sun.java.swing.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.util.*;
/**
*
*/
public class Jspi extends javax.swing.JApplet {
public void init() {
getContentPane().setLayout(new GridLayout(5, 1, 10, 10));
final JTextArea jt = new JTextArea();
jt.setBackground(Color.cyan);
jt.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent ke) {
System.out.println("JText: " +
Integer.toHexString((int) ke.getKeyChar()));
}
});
getContentPane().add(jt);
final JTextField tf = new JTextField ();
tf.setFont( new Font("unicode",0,14 ) );
//tf.setText("\u00e0\u00c0\u00e8\u00c8\u00ec\u00cc\u00f2");
tf.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
int take = Integer.parseInt(tf.getText(), 16);
jt.append((char) take + "");
tf.setText("");
}
});
tf.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) ;
jt.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) ;
getContentPane().add(tf) ;
}
}
(Review ID: 99307)
======================================================================
- duplicates
-
JDK-4710675 JTextArea.setComponentOrientation does not work with correct timing
-
- Resolved
-