Topic: JTextFied怎么把输入的文字变成*,成为密码形式

  Print this page

1.JTextFied怎么把输入的文字变成*,成为密码形式 Copy to clipboard
Posted by: hussarlw
Posted on: 2006-06-22 17:53

各位大侠,请教一下如何在JBuilder 2005里面让JTextFied设置把输入的文字变成*,成为密码形式。

2.Re:JTextFied怎么把输入的文字变成*,成为密码形式 [Re: hussarlw] Copy to clipboard
Posted by: jsmile
Posted on: 2006-06-22 19:33

You could use JPasswordField (in JDK Swing) rather than JTextFied, all it does is to set a echoChar = '*'.

>>> public class JPasswordField extends JTextField

3.Re:JTextFied怎么把输入的文字变成*,成为密码形式 [Re: hussarlw] Copy to clipboard
Posted by: jerryikitty
Posted on: 2006-06-27 12:08

楼上正解


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923