Re: Setting check box via property file
- From: Eric Sosman <esosman@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 11:23:22 -0400
christopher_board@xxxxxxxxxxx wrote:
Hi. am writing a java program where there are different user accounts
that can be used to log into the program. On the logon screen is a
check box that says remember me. If I select the check box and login
it then writes a property file that says what the user and the
password was and if the checkbox was selected. Once the program is
loade up again it then loads the property file and adds the username
and password into the login box but I don't know how to make the check
box selected from the properties file.
Are you using a JCheckBox? In the part of the program
that reads the properties file and fills in the user name
and password, call setSelected(true) on the JCheckBox object.
(Aside: It makes my flesh creep when some program offers
to be "helpful" and remember my password for me. What's the
point of even having a password if any J. Random Hacker can
just launch the program and be automatically logged in as me?
It seems exactly as secure as writing the user name and password
on a PostIt note stuck to the corner of the monitor. But if
that's what you want, well ...)
--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Setting check box via property file
- From: Andrew Thompson
- Re: Setting check box via property file
- References:
- Setting check box via property file
- From: christopher_board
- Setting check box via property file
- Prev by Date: Setting check box via property file
- Next by Date: Re: Setting check box via property file
- Previous by thread: Setting check box via property file
- Next by thread: Re: Setting check box via property file
- Index(es):