If I want to enter text from the right side of a JTextField what do I need to do? I have a JTextField object called jtf I do : jtf.setHorizontalAlignment(JTextField.RIGHT_ALIGNMENT) Firstly this doesn't compile because the field is a float but the method expects an int. When I cast it to int it compiles alright but I get a runtime error saying it's an invalid parameter. Any ideas? Paul
Chad McGowan
Ranch Hand
Joined: May 10, 2001
Posts: 265
posted
0
For setHorizontalAlignment(), you need to use JTextField.RIGHT Chad