Currently JTextField aligns all text to the left side, how do you change it so all text typed into it goes to the right side instead?

Recommended Answers

JTextField.setHorizontalAlignment(JTextField.RIGHT);
Jump to Post

All 2 Replies

JTextField.setHorizontalAlignment(JTextField.RIGHT);

Thanks for the tip.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.