aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Connecting 2 GUI" Watch "Connecting 2 GUI" New topic
Author

Connecting 2 GUI

manelaz denz
Greenhorn

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
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
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 ]

Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting 2 GUI