| | |
Login Successful, close Login file and Open another file
![]() |
•
•
Join Date: Aug 2007
Posts: 199
Reputation:
Solved Threads: 0
Hi.
I have a LoginForm.java, and then when the user enter the right username and password, then another file called "DictionaryForm.java" opens and the LoginForm.java, closes. How can I do that ???
see the LoginForm.java:
http://www.daniweb.com/forums/thread119702-2.html
I have a LoginForm.java, and then when the user enter the right username and password, then another file called "DictionaryForm.java" opens and the LoginForm.java, closes. How can I do that ???
see the LoginForm.java:
http://www.daniweb.com/forums/thread119702-2.html
•
•
Join Date: Aug 2007
Posts: 199
Reputation:
Solved Threads: 0
As I put the link, I have the LoginForm.java, which is not directly JFrame, but at the runtime, it creates a Form and asking for username and password,
and then I create a new Jframe Form, and named it DictionaryForm.java.
and in the LoginForm.java, if the username and password is correct it display a message, but I need it displays the DictionaryForm.java instead, and also the LoginForm.java should be closed.
I dont know what to do?
and then I create a new Jframe Form, and named it DictionaryForm.java.
and in the LoginForm.java, if the username and password is correct it display a message, but I need it displays the DictionaryForm.java instead, and also the LoginForm.java should be closed.
I dont know what to do?
•
•
•
•
As I put the link, I have the LoginForm.java, which is not directly JFrame, but at the runtime, it creates a Form and asking for username and password,
and then I create a new Jframe Form, and named it DictionaryForm.java.
and in the LoginForm.java, if the username and password is correct it display a message, but I need it displays the DictionaryForm.java instead, and also the LoginForm.java should be closed.
I dont know what to do?
•
•
•
•
Originally Posted by earlierPost
public class LoginForm extends JFrame
what you can do (and I'm not saying it's the most elegant or efficiƫnt way, just got to work here
)in the LoginForm.java, you add the line
Java Syntax (Toggle Plain Text)
this.dispose();
to that part of the if-structure where the login succeeds
on the place where you call the loginFrame, you check wether or not it is still "active", or "visible", or you place a trigger in your LoginFrame.java, right before the dispose(), and after this checks out, you call the DictionaryForm
well ... first tip, LoginForm is not supposed to be or contain your main method, it's a tool that's to be used, nothing more.
just put the main method in a new class and use that to call the LoginForm and the DictionaryForm.
when you've done that, re-read the posts above and put those thoughts into a bit of code.
for what I can see in the code you attached, you haven't tried to code it yet, so it's nothing but natural that it doesn't work yet
just put the main method in a new class and use that to call the LoginForm and the DictionaryForm.
when you've done that, re-read the posts above and put those thoughts into a bit of code.
for what I can see in the code you attached, you haven't tried to code it yet, so it's nothing but natural that it doesn't work yet
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- How can i retrieve data after i logod on..... (ASP.NET)
- I am unable to login, usernames are gone (Viruses, Spyware and other Nasties)
- Quick VB2005 help....how do I get this basic app started? (VB.NET)
- Login used to work (ASP.NET)
- Login and retrieve user data from database (ASP.NET)
- URGENT! Loading Roles From ticket.UserData (ASP.NET)
Other Threads in the Java Forum
- Previous Thread: java project
- Next Thread: JCombobox
| Thread Tools | Search this Thread |
account android api applet application array arrays automation bidirectional binary birt bluetooth class classes client code columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error errors exception expand fractal game givemetehcodez graphics gui guidancer homework html ide image inetaddress inheritance integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield jtree julia linux list loop map method methods midlethttpconnection mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source oracle plazmic print problem program project property recursion ria scanner search server set sharepoint smart sms smsspam sort sourcelabs splash sql sqlite static string subclass support swing testautomation threads tree unlimited webservices windows





