• Post Reply Bookmark Topic Watch Topic
  • New Topic

Implementing a Cyclical Login/logout application.  RSS feed

Daniel Pride
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An Application I'm creating involves a modal log in dialogue. It requires the user to authenticate their information, if it is not authenticated, they will have three chances before they are locked out, otherwise they are logged in and a modless JFrame Frorm is presented to them. This implementation is trivial, simply adding a boolean variable that is set in the login form and checked before creating and showing the main form, quitting otherwise.

The thing that I'm having a problem with is setting it so that when the user chooses the option for logging out, the main frame is closed and the login dialog is shown for other users to enter.

I at first tried to have it so in the main, the routine for showing the login, checking it's validation boolean, and showing the main form in a loop. This worked in theory except the main form is modeless so the dialogue shows up immediately when the main form is shown.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!