File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Connecting 2 GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Connecting 2 GUI" Watch "Connecting 2 GUI" New topic

Connecting 2 GUI

manelaz denz

Joined: Jun 22, 2008
Posts: 1
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

Joined: Mar 22, 2005
Posts: 42965
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:

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:
[ June 22, 2008: Message edited by: Ulf Dittmer ]
I agree. Here's the link:
subject: Connecting 2 GUI
It's not a secret anymore!