Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting 2 GUI

 
manelaz denz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1).Hi, Please how do i connect my LoginForm to my Registrationform so that when the right user name and password is entered in the login form, it automatically brings out the other form. please i need to know the line of code for that as all i have done lately have proved abortive.

2).Is there any way i can have my username and password stored in a database so that when i input a username and password in my login form it goes into the databse to chect if its correct or not. please whats the line of code..
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

As to #1, there are various ways to display different groups of elements in AWT/Swing. Using a JTabbedPane might be one approach, while using a CardLayout might be another. Neither is a one-line solution, but then, there are no one-line solutions for this.

JTabbedPane tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/tabbedpane.html

As to #2, the Java API for database access is called JDBC, and you'd be better off asking the question in the JavaRanch JDBC forum. Again, quite a few more than a single line of code will be needed. Have you set up a database already?

JDBC tutorial: http://java.sun.com/docs/books/tutorial/jdbc/overview/index.html
[ June 22, 2008: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic