By Alvin Alexander. Last updated: June 4, 2016
Java JTextField question: How do I right-align the text in a JTextField?
Short answer:
myTextField.setHorizontalAlignment(SwingConstants.TRAILING);
Long answer: I need to look at this some more to understand the difference between the alignment constants in SwingConstant and the alignment constants in JTextField.