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

学习是最好的投资!

reply all (1)
黄舟

UseJTextFieldsetCaretPosition方法,可以设置光标的位置。
在设置完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
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!