java - swing中textfield如何设置左对齐?
PHPz
PHPz 2017-04-18 10:38:50
0
1
488
PHPz
PHPz

学习是最好的投资!

reply all(1)
黄舟

Use JTextFieldsetCaretPosition 方法,可以设置光标的位置。
在设置完 JTextField 的 text 之后,调用 setCaretPosition(0) to move the cursor to the front to get the effect you need.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template