Results 1 to 7 of 7
- 11-26-2008, 07:07 PM #1
Member
- Join Date
- Nov 2008
- Posts
- 8
- Rep Power
- 0
[SOLVED] How to close the current form when i open a new form?
Hi,
I created 2 form, login and register, and i have got buttons on 2 of the form. On the login form, there is a button with ButtonMouseClicked(evt) that will open the register form.
The code i use to open the register form is new Register().setVisible(true);. Then i added new Login().setVisible(false); to try to close the login form but it cant work.
Can anyone help me with this?
- 11-27-2008, 12:39 AM #2
Repaint? We have to call some form of repaint, which is currently somewhat convoluted, but often without a call to repaiint it take great time visible item show on screen.
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 11-27-2008, 06:43 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,370
- Blog Entries
- 1
- Rep Power
- 26
Or else you can dispose the login form and set the visible to true on the second form.
- 11-28-2008, 07:35 AM #4
Member
- Join Date
- Nov 2008
- Posts
- 8
- Rep Power
- 0
Thanks for the reply,
I dun get you with the repaint part.
I tried
Login().dispose();
new Register().setVisible(true);
but there is a error which says cannot find symbol for method Login and dispose.
- 11-28-2008, 07:40 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,370
- Blog Entries
- 1
- Rep Power
- 26
Did you read about dispose() on Java doc? You are using it in wrong way.
- 11-28-2008, 07:48 AM #6
Member
- Join Date
- Nov 2008
- Posts
- 8
- Rep Power
- 0
Thanks for the help, i got it.
- 11-28-2008, 07:55 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,370
- Blog Entries
- 1
- Rep Power
- 26
If you have solve the problem please mark the thread solved.
Similar Threads
-
New to this form
By talasilasumanth in forum IntroductionsReplies: 5Last Post: 10-30-2008, 01:34 PM -
enctype=multipart/form-data with form data in struts
By vk_satheesh in forum New To JavaReplies: 0Last Post: 09-19-2008, 01:48 PM -
Open specific folder form JSP
By roseline43 in forum New To JavaReplies: 2Last Post: 09-02-2008, 08:53 PM -
How to close an open JFrame window from a jsp page?
By kasisaiganesh in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 05-27-2008, 07:29 PM -
Form Help Pls
By CoOlbOyCoOl in forum NetBeansReplies: 4Last Post: 05-27-2007, 09:31 AM
Bookmarks