Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes How to close a window and open another one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to close a window and open another one" Watch "How to close a window and open another one" New topic
Author

How to close a window and open another one

George Papadopoulos
Greenhorn

Joined: Apr 13, 2004
Posts: 3
I'm a very new programmer so this question may sound stupid but: How do i make a JButton close the current window and open a new one?For example a have an introduction screen in my program and when the user clicks on continue I want it to open the main application window.
Thanx a lot!!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Something like this perhaps
George Papadopoulos
Greenhorn

Joined: Apr 13, 2004
Posts: 3
Thank u very much.u've been a great help.
Another question...
what documentation do i need to find commands like dispose etc.?
is there any help program for java or a good reference book maybe?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
The java api is a good site (you can download it, about 30mb zip)
http://java.sun.com/j2se/1.4.2/docs/api/index.html
Depending on your IDE, if you download and instal the api docs, then point
your IDE to where you've unzipped it, you can (generally) highlight the
class name, click on help/JDK help and the api page will open. You can then
go through all of the methods of the class (to see what they do), and check
for inherited methods - in this case dispose() is a method of Window.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to close a window and open another one
 
Similar Threads
opening new browser window from applet
javascript closing windows
Creating new session ids
closing !!
How to control no. of Child Windows