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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.