• Post Reply Bookmark Topic Watch Topic
  • New Topic

Working with Two Windows  RSS feed

Mike Cutter
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a JDBC GUI application that can change the passwords of Oracle users which called ChgPass. I wrote another GUI application that can authenticate to an NIS server with a username and password called Login. Both work well as separate programs.

I am kind of a novice with multiple classes and multiple GUIs. I would like to consolidate the Login and ChgPass applications into one program. I was hoping to be able to first launch the Login GUI to authenticate the user then if successful, the ChgPass GUI will launch with the Login GUI disappearing. If the authentication fails, the ChgPass GUI never launches and the Login GUI still on the screen.

I am having a problem testing for the authentication in the Login class and passing a static boolean variable to the ChgPass class. The Login class would set it to true when the username and password was correct, but the true value never passed to the ChgPass class. I know that global variables are not good Java programming practices. I tried to create a method in the Login class that was not recognized in the ChgPass class.

Any ideas would be helpful.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!