dcsimg

Is there anyway I can right-align text in a TextField?

John Zukowski

The AWT TextField doesn't support alignment. The Swing JTextField does. If you can, consider using it, instead.


jTextField.setHorizontalAlignment(JTextField.RIGHT);