f



text box orientation right to left

Hi,

I am new to java. Am creating a math webpage for teachers.  I have math 
problems where the input needs to be right to left (e.g. adding two 
multi-digit numbers in a column).  Is there an easy way to specify that the 
caret position needs to move from right to left instead of the standard left 
to right?

kd


0
kd
10/29/2004 3:52:16 PM
comp.lang.java.gui 8282 articles. 0 followers. Post Follow

1 Replies
272 Views

Similar Articles

[PageSpeed] 12

"kd dolezal/rob nishida" <kddran.6.26.83@verizon.net> wrote in message news:<QGtgd.926$vJ.799@trnddc02>...
> Hi,
> 
> I am new to java. Am creating a math webpage for teachers.  I have math 
> problems where the input needs to be right to left (e.g. adding two 
> multi-digit numbers in a column).  Is there an easy way to specify that the 
> caret position needs to move from right to left instead of the standard left 
> to right?
> 
> kd
JTextField

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)

    Sets the horizontal alignment of the text. Valid keys are:

        * JTextField.LEFT
        * JTextField.CENTER
        * JTextField.RIGHT
        * JTextField.LEADING
        * JTextField.TRAILING 

    invalidate and repaint are called when the alignment is set, and a
PropertyChange event ("horizontalAlignment") is fired.

    Parameters:
        alignment - the alignment 
    Throws:
        IllegalArgumentException - if alignment is not a valid key
0
california_paladin
11/1/2004 10:01:16 PM
Reply: