title: Java remember login information
body: <p>What is a secure way to store login information? I have a swing application that requires users to login to an online account, currently logging in works, but I would like to be able to store the users login information on their computer if possible. There are a few ways I have thought of to do this:</p>
  
  <ol>
  <li>Save the login information in a file</li>
  <li>Save the login information in a database</li>
  </ol>
  
  <p>What is the best way to do this? Does Java have something built in to do this?</p>