This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JPasswordField Vs. JTextField Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JPasswordField Vs. JTextField" Watch "JPasswordField Vs. JTextField" New topic
Author

JPasswordField Vs. JTextField

Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

Hi Actually I have seen somewhere that somebody has made JtextField functionality same as JPasswordField without using ActionListeners. COuld anyone suggest me that how to Convert the functionality of JTextField in JPasswordField without using any event handling (i.e. Key Pressed Events ). If yes then also give the code unfortunately I don't have that ultimate code.


The Best way to predict your future is to create it - Every great individual common man
Randall Kippen
Greenhorn

Joined: Oct 18, 2005
Posts: 15
They probably wrote their own Document object. Whenever an insert would happen, it would insert some generate mask character. The document would probably have to do some extra work to keep track of the current text (the password). Seems like a lot of work without much of a payoff.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPasswordField Vs. JTextField