View Single Post
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: Login Successful, close Login file and Open another file

 
0
  #4
Sep 17th, 2008
Originally Posted by tanha View Post
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
sure looks like a JFrame to me ..

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
  1. 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
Reply With Quote